Re: Problem calling my C DLL from a IDE created source
- Posted by Igor Kachan <kinz at peterlink.ru> Mar 07, 2007
- 513 views
Andrew Katz wrote: [snip] > Adding the + had no effect. Should I try to compile the EUPHORIA language > myself and try to debug it? Hi Andrew, Your C test code:
-- #if defined(__cplusplus) -- #define EXPORTED extern "C" __declspec( dllexport ) -- #else -- #define EXPORTED __declspec( dllexport ) -- #endif -- EXPORTED int dll_entry( int arg ) -- { -- return (arg + arg); -- } is just equal the following Euphoria code: global function dll_entry(integer x) return x+x end function
I've translated it using ecw.exe with -wat -dll options and compiled with OW 1.4 Resulting Dll works Ok for me here, your test program prints 00000010. So I think, why not go this way? DLL is yours one, you have C code, Euphoria code is simple ... Why not? Then, maybe to compile your C code of your Dll with options of make.bat, generated by ecw.exe? I'm not a specialist in C/C++, so just my $0.02. Regards, Igor Kachan kinz at peterlink.ru