I want to compile my application in 32 bits in win 7 64 bits. My application depends only in wxWidgets and libpqxx libraries. My intention is maximizing the number os windows flavors it runs, i mean, XP as well as win7/8, so the need for 32 bits.
I already compiled it, and it's working on win 64 bits. But when I run it on XP it crashes. I'm thinking this is due to some 64 bits dependency that I still cannot find.
So what I need is a way to garantee that every part is really 32 bits compiled. So I need to test my exe, my self-compiled libpqxx, my wxWidgets library and my mingw. For the libraries I'm trying both dynamic and static mode. I prefer static and would only use dynamic if I really have to.
I ask you: what tool would show me if my exe, static and dynamic libraries and compiler are 32 or 64 bits ? I already used DependencyWalker and it didn't report me what I need. I gives one result on 64 bits OS and other on 32 bits OS.
For the libraries I'm trying both dynamic and static mode. I prefer static and would only use dynamic if I really have to.
Mixing dynamic and static libraries could give you a crash, also always prefer dynamic linking to avoid linking different copies of the CRT.
For example, if you allocate memory inside a DLL and try to free that inside your executable could give you a crash in case of static linking due to different copies of the CRT linked in (they see different memory address).
There is no way to link both 32 and 64 bit libraries inside the same executable, you will get a linker error if you try to do that.
To detect if a executable is compiled as X86 or x64 use some tool like dumpbin (comes with Visual Studio) or even 7zip (look at PE headers). Of course, you can run yourself IsWow64Process().