Hi all, I created a simple dll to try the Dll&C connect
#include <iostream> #define DLLExport _declspec(dllexport) DLLExport int sum(int arg1, int arg2){ return arg1+ arg2; } In smalltalk, I created a class named: DLLTest and a function: sum: arg1 with: arg2 <C: int sum(int arg1, int arg2)> ^self externalAccessFailedWith: _errorCode When I received the error when I run: DLLTest new sum: 1 with: 2 command. But when I called abs function in msvcrt40.dll. It works. What should I do to fix it? Thank all. |
* Check first if the DLL is loaded with your call ( but your code is simple and the only the other reason is putting in Extern C )
On Sun, Mar 1, 2015 at 2:00 PM, lhhuong <[hidden email]> wrote: Hi all, I created a simple dll to try the Dll&C connect _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Can you provide a listing of your DLLTest class definition?
On 3/1/15 4:07 AM, Sudhakar
Krishnamachari wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |