[Dev-C++] Linking a Dev-C++ DLL using VC++.net
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Dirk T. <d.t...@gm...> - 2003-12-28 23:22:31
|
Help! I'm new to this list and quite new to programming on Windows, so please=20 forgive me any ignorance. I like Dev-C++ a lot and find it more usable in many respects than the=20 commercial M$ offerings. My problem is as follow: I have a source-code (in plain C for gcc) of a=20 library I need to use in a Visual-Studio project (for the W32 gui). I was able to successfully port (compile and link) the library into a=20 dll using Dev-C++ (current - good job, folks) and the dll projects type=20 (using declspec etc. for exports). Then I created a small VC++.net project and included the import library=20 and headers. everything links fine but the test app crashes on the=20 first library call with a read access violation. After much fiddling and reading I started loading the DLL and calling=20 some functions dynamically using GetProcAddress(). This works as expected and leads me to thinking that there is some=20 incompatibility in the import library. Can it be the calling convention? I did not declare any and the=20 def-file created by Dev-C++ does not contain underscores nor=20 @<paramtersize> decorations. It would also be an option to link statically against the GCC-built=20 library using VC++. I tried that but also got nothing but crashes. Is that possible at all? Note that I only use pure C, no C++ anywhere. Any help is very much ap=FCpreciated! Greetings, Dirk |