c++ - How to compile 32-bit application via Clion 2017.1 under Windows 10 x64? -
i use windows 10 x64 , clion 2017.1 create c++ applications, , under x64 system works fine.
but today run app under windows 7 x32, , got error: "version of file not compatible windows version. required version of application (32-bit or 64-bit) via system information":
- i tried compile "-m32" flags directly windows console (cmd.exe), this:
g++.exe -m32 path\to\source\file\file.cpp -o exe_file_name
- also tried modify
cmakelists.txt
file adding line:
set_target_properties(projectname properties compile_flags "-m32" link_flags "-m32")
both ways returns errors:
c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libkernel32.a when searching -lkernel32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lkernel32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libuser32.a when searching -luser32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -luser32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libgdi32.a when searching -lgdi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgdi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libwinspool.a when searching -lwinspool c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwinspool c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libshell32.a when searching -lshell32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lshell32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libole32.a when searching -lole32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lole32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\liboleaut32.a when searching -loleaut32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -loleaut32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libuuid.a when searching -luuid c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -luuid c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libcomdlg32.a when searching -lcomdlg32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcomdlg32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libadvapi32.a when searching -ladvapi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ladvapi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0\libstdc++.a when searching -lstdc++ c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lstdc++ c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching -lmingw32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0\libgcc.a when searching -lgcc c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0\libgcc_eh.a when searching -lgcc_eh c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_eh c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching -lmoldname c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching -lmingwex c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingwex c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching -lmsvcrt c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcrt c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libpthread.a when searching -lpthread c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpthread c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libadvapi32.a when searching -ladvapi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ladvapi32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libshell32.a when searching -lshell32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lshell32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libuser32.a when searching -luser32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -luser32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libkernel32.a when searching -lkernel32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lkernel32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libiconv.a when searching -liconv c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -liconv c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching -lmingw32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32 c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0\libgcc.a when searching -lgcc c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0\libgcc_eh.a when searching -lgcc_eh c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_eh c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching -lmoldname c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching -lmingwex c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingwex c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching -lmsvcrt c:/progra~1/mingw-~1/x86_64~1.0-p/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcrt
how can deal it?
p.s. saw links:
but still don't understand how solve problem. help.
after lot of searching in web (and because have no answers on my question on clion ides support) remove clion laptop , move c++ development eclipse ide c/c++ developers.
i think flexible , comfortable ide, , compile solution under eclipse need go solution_name (right mouse click) -> properties -> c/c++ build -> settings -> (in mingw c++ linker) miscellaneous -> (on right pane, in "linker flags" field)
, add "-m32" flag
.
sometimes free ide eclipse
has more features , is more comfortable chargeable ides clion
.
p.s. jetbrains team made me upset.
Comments
Post a Comment