PlainOldPhil
Programmer
Hi all,
I wrote a library under linux in GCC and now I'm trying to use it in Borland C++ Builder. I used MinGW to compile it into a Windows DLL, and then used implib to generate a borland lib file for it. The DLL is linking to the program just fine, and it's calling the function in the DLL without any problems, but as soon as that function calls an internal function of the DLL the program crashes. Let me give an example to be a little more clear. In Borland, I use:
extern "C" __declspec(dllimport)void libShare(int argc, char** argv);
to prototype the function out of my dll. I can call libShare just fine, but as soon as libShare calls an internal function of the dll, it crashes with the error: "access violation at 0x011933d4: read of address 0xfeeeefeeee. Process stopped blah blah blah."
Now here's the crazy part. When I run it out of just a console app in Borland, everything works exactly how it's supposed to . Any ideas at all on this? (PS.. I know this post was long, I'm sorry).
PPS... just thought of this, I used some stdio stuff in the program like printf etc... Could this make a difference?
Thanks in advance,
Phil
I wrote a library under linux in GCC and now I'm trying to use it in Borland C++ Builder. I used MinGW to compile it into a Windows DLL, and then used implib to generate a borland lib file for it. The DLL is linking to the program just fine, and it's calling the function in the DLL without any problems, but as soon as that function calls an internal function of the DLL the program crashes. Let me give an example to be a little more clear. In Borland, I use:
extern "C" __declspec(dllimport)void libShare(int argc, char** argv);
to prototype the function out of my dll. I can call libShare just fine, but as soon as libShare calls an internal function of the dll, it crashes with the error: "access violation at 0x011933d4: read of address 0xfeeeefeeee. Process stopped blah blah blah."
Now here's the crazy part. When I run it out of just a console app in Borland, everything works exactly how it's supposed to . Any ideas at all on this? (PS.. I know this post was long, I'm sorry).
PPS... just thought of this, I used some stdio stuff in the program like printf etc... Could this make a difference?
Thanks in advance,
Phil