|
From: Don-Duong Q. <dj...@ya...> - 2002-09-30 17:00:35
|
I found a solution to my problem but I don't know why it works. Anyway, for anyone that followed my previous posts, here's what I did. I did the standard thing of declaring a couple macros to export/import dlls, for example: #ifdef DLL_BUILD #define GBEXPORT __declspec (dllexport)#else #define GBEXPORT __declspec (dllimport)#endif However after building the wrapper and running my C# test app, I'd get an exception thrown at me. However linking with my static libs would fix it. So I decided I would create static lib configurations. So I changed my macros to: #ifdef USING_DLL #ifdef DLL_BUILD #define GBEXPORT __declspec (dllexport) #else #define GBEXPORT __declspec (dllimport) #endif#else #define GBEXPORT#endif When I was experimenting with dlls again, by accident I forgot to include USING_DLL in my wrapper projects. So for some weird reason when including dllimport in my wrapper project, I get weird problems with C#. Oh well that's solved. Don --------------------------------- Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! |