Menu

#100 DLL 32Bit/64Bit issue with executables

None
closed
None
2015-07-31
2013-10-25
exxoo
No

Version: 5.4.0
OS Version: Win7 x86 Enterprise SP1

I am trying to compile my own DLL. With the 64Bit edition of this dev-cpp version i can manage to get a valid 64-bit DLL without any warnings. If I am trying to do the same with the 32Bit edition of the same version I get a valid 32bit DLL too.
Now here comes what I see as a bug or misconfiguration:

trying to get a 32Bit dll from the 64bit compiler fails with an error from ld - complaining about input architecture does not fit output architecture. Thats why I am assuming that the 64bit compiler binary set is not able to produce 32bit DLLs OR wrong binaries get used.

All I've done is installing the 64bit version, setting the compiler in projectOptions|Compiler to tdm-gcc 4.7.1 32-bit, saying code generation 32bit width, iso c++ and adding the parameter -DBUILDING_DLL=1. oh and applying --no-export-all-symbols --add-stdcall-alias to the linker with some library includes. Do not using custom makefile.

getting: c:/dev-cpp/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `xxxxx.exp' is incompatible with i386 output

I hope you can help me how I might configurate everything right. Even better fix the issue at all.

Thanks in advance
exo

edit: maybe worth mentioning it: I AM able to produce 32bit executables out of this configurated 64Bit compiler. So its just an issue with DLLs. This saying, it might be something with dllwrap.exe, since its the only .exe more called than in a normal exe-build if I am not wrong, am I?

Discussion

  • exxoo

    exxoo - 2013-10-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -17,3 +17,7 @@
    
     Thanks in advance
     exo
    +
    +
    +
    +edit: maybe worth mentioning it: I AM able to produce 32bit executables out of this configurated 64Bit compiler. So its just an issue with DLLs. This saying, it might be something with dllwrap.exe, since its the only .exe more called than in a normal exe-build if I am not wrong, am I?
    
    • Milestone: -->
     
  • exxoo

    exxoo - 2015-07-31
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB