How to change target architecture?
pulpocaminante opened this issue · 4 comments
Started an x86 MSVC command prompt and ran vcvars32,bat and it compiled for x64.
I couldn't figure out how to change the target architecture so I tried manually changing the define in target_arch.c to _M_IX86 and replacing every "x64" in CMakeCache with "x86." Still compiled for x64. Is there an official way to do this?
You normally start the command prompt you want then compile and everything is as it should be.
At least that's the case when using nmake -f [port\]Makefile.vc [DEBUG=] [DLL=] [WIDE=] [UTF8=] [CHTYPE_32=] IX86=Y
.
For cmake it seems to be:
- call vcvarsall
- use the generator first
- use the building
see https://github.com/Bill-Gray/PDCursesMod/blob/master/appveyor.yml for details
Thank you bunches, GitMensch. Followed the build path in the appveyor file and it worked fine.
SDL fails to link but I'll figure it out
I'm almost entirely ignorant of CMake and don't use it myself. The various ports all have, in the 'Building' section of README.md
, some comments about building with the various makefiles. They don't say anything about building with CMake. Should they?
In my amateurish opinion its probably not worth the hassle of documenting, since they're both available on the MSVC toolchain and nmake just works. But again, amateurish.
Side note, I'm having a blast with PDCursesMod. Big thanks to everyone who helps maintain this project.