-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit cmake instruction to compile x64 #24
base: master
Are you sure you want to change the base?
Conversation
The previous command: ``` cmake " -DBUILD_ONLY="core;gamelift;cognito-identity" -DCMAKE_BUILD_TYPE="release" ``` Defaults to building x86 (32bit) dlls and libs. These then do not link with the more commonly used 64bit target platform for the GameLiftClient and rest of their Unreal game. The error that the Visual Studio will throw is "library machine type 'x86' conflicts with target machine type 'x64' ". I have edited the command to build for x64 by default with brief instructions on how to compile for x86 if desired.
Hmmm interesting. This could have actually been the reason I've been experiencing issues lately. I will try this out later to see if that is the case. |
When I tried executing your command, I couldn't include the "Win64" as it was not allowing me to execute the cmake command. However, specifying the version of Visual Studio worked. I am still not sure if it made a difference, but I will find out soon. |
Actually. because of specifying the Visual Studio version, the msbuild command was able to succeed with no errors. Before it would fail some tests but still generate the dll/lib files. I will try to include this in my pr. I think this will make a difference. Although, I'm not sure why considering I only have one version of Visual Studio installed. Any ideas on why this modified command makes the msbuild succeed all the tests? |
Ah yeah cmake can be a pain, I had to re-clone the repo in order to include the "Win64" and compile x64. Otherwise it assumes you wanted to compile x86 like you did previously and throws errors, quite annoying. I'm not sure why the VS version would have that effect, I happen to have VS 2017 and VS 2015 installed and see this for the cmake generators (
Ended up using |
Oh wow interesting, thank you for posting the generators. Seems that for Visual Studio 2019, you need the |
No problem. I have experience working on linux cli setting up servers and network connections but unfortunately not much experience with cross-compiling. I was planning to start compiling it for linux servers after I set up some of the other infrastructure and resolve the other issues I have posted about here. |
So after some further research it seems that the proper way to specify target architecture is to actually use aws custom cmake flags, which can be found here. This is currently the command I use,
For cross compilation, however, I would remove the |
Ah ok. Nice find! |
The previous command:
Defaults to building x86 (32bit) dlls and libs. These then do not link with the more commonly used 64bit target platform for the GameLiftClient and rest of their Unreal game. The error that the Visual Studio will throw is "library machine type 'x86' conflicts with target machine type 'x64' ".
I have edited the command to build for x64 by default with brief instructions on how to compile for x86 if desired.