User forums > Help
No stdlib, custom startup code - GDB doesn't work
Mr.Madguy:
If somebody is interested, for now problem with anti-virus is fixed via comparing my C++ code with similar ASM program, that doesn't have such problems. Looks like anti-viruses hate GetModuleHandle("KERNEL32.DLL"). It's better to use LoadLibrary/FreeLibrary instead.
Another question - why it's necessary to install 32bit gcc in order to compile for 32bit target (i.e. -m32)? Why there is no cross-compile option? According to error messages 64bit compiler can't find 32bit libraries when using -m32. So may be there is some way to configure paths instead of using 32bit compiler?
stahta01:
--- Quote from: Mr.Madguy on April 24, 2023, 08:46:57 pm ---If somebody is interested, for now problem with anti-virus is fixed via comparing my C++ code with similar ASM program, that doesn't have such problems. Looks like anti-viruses hate GetModuleHandle("KERNEL32.DLL"). It's better to use LoadLibrary/FreeLibrary instead.
Another question - why it's necessary to install 32bit gcc in order to compile for 32bit target (i.e. -m32)? Why there is no cross-compile option? According to error messages 64bit compiler can't find 32bit libraries when using -m32. So may be there is some way to configure paths instead of using 32bit compiler?
--- End quote ---
For "-m32" to work for complex programs; the Compiler Builder needs to build the support libraries for 32 bit. Most of the 64 bit Compilers that support "-m32" do not build very many 32 bit libraries.
Tim S.
nenin:
--- Quote from: Mr.Madguy on April 24, 2023, 08:46:57 pm ---Another question - why it's necessary to install 32bit gcc in order to compile for 32bit target (i.e. -m32)? Why there is no cross-compile option? According to error messages 64bit compiler can't find 32bit libraries when using -m32. So may be there is some way to configure paths instead of using 32bit compiler?
--- End quote ---
It is long story. Actually they exists, but likely you dont want them: "https://sourceforge.net/projects/mingw-w64/files/Multilib Toolchains(Targetting Win32 and Win64)/ "
My experience with multiply mingw compilers (I have now 3 actually in use, 32b, 32b for XP and 64b) is like this: I use bat files which switch path and I have different configs in CB. And there are no big problems to switch.
Navigation
[0] Message Index
[*] Previous page
Go to full version