Author Topic: msvc calling a dll built by c::b  (Read 3752 times)

Offline coding_ant

  • Single posting newcomer
  • *
  • Posts: 2
msvc calling a dll built by c::b
« on: December 12, 2010, 02:43:23 pm »
1. I recently built a dll(C language), using default settings. (test_gcc.dll   test_gcc.dll.a)
2. I built another dll project(msvc 6.0 C++ language), using test_gcc.dll.a as an input.(test_msvc.dll)
3. I built an host execuatable project using msvc 6.0.(test.exe)

when i debug test_gcc.dll, an segment error will pop up. Can anybody give me some hints what i missed?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: msvc calling a dll built by c::b
« Reply #1 on: December 12, 2010, 04:10:50 pm »
Yes, You wrote bad source code is the most likely cause.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline coding_ant

  • Single posting newcomer
  • *
  • Posts: 2
Re: msvc calling a dll built by c::b
« Reply #2 on: December 13, 2010, 04:26:40 pm »
thx, i reviewed my code and fixed a bug. Now i run into another, when i debug test_gcc.dll using c::b, i was presented with a pop-up dialog saying "signal SIGSEGV,Segmentation fault" when i call any exported function that is before i execuate any code in the test_gcc.dll. so any idea?

Offline xawari

  • Multiple posting newcomer
  • *
  • Posts: 36
  • programming, usability ctrl
    • welcome to reality
Re: msvc calling a dll built by c::b
« Reply #3 on: December 14, 2010, 08:42:39 pm »
Search more about compiler/DLL binary incompatibility. Even different major versions of GCC produce incompatible binaries, so that's might be your case. Can't tell for sure, though.
┌──────────────────────────────────────────────────────╖
in another thousand years we'll be machines or gods█
╘══════════════════════════════════════════════════════╝