Trouble compiling

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Trouble compiling

#1 Post by wobbly »

Windows 11
VS Community 2022 Version 17.6.2
output.png
output.png (7.43 KiB) Viewed 884 times
compileerror.png
Attachments
compileerror.png
compileerror.png (21.51 KiB) Viewed 884 times

o01eg
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Trouble compiling

#2 Post by o01eg »

MSBuild version 17.5.1+f6fdcf537 in CI builds fine.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Trouble compiling

#3 Post by wobbly »

Right, so to get that far I need to go into project properties and add to additional include directories: ;./ otherwise its not finding StdAfx

I no longer get the C1001 error if I go into project properties and change C++ language standard from:
preview -features from the latest C++ Working Draft
to:
ISO C+ +20 Standard

but its still not compiling. I get a ton of:
error LNK2001: unresolved external symbol

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Trouble compiling

#4 Post by wobbly »

LNK.png
LNK.png (64.07 KiB) Viewed 844 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Trouble compiling

#5 Post by Geoff the Medio »

Make sure you've got the right SDK version and that you've switched the configuration at the top of the GUI to match. GLEW linker errors usually indicate a mismatch. Probly you have it in Win32 mode but have an x64 SDK, since the Win32 config has the "latest" C++ standard set, while the x64 config has C++20 set by default.

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Trouble compiling

#6 Post by wobbly »

Geoff the Medio wrote: Sun Jun 04, 2023 11:11 am Probly you have it in Win32 mode but have an x64 SDK, since the Win32 config has the "latest" C++ standard set, while the x64 config has C++20 set by default.
Yeah that seems to have been the issue. I switched to a command line which seems to run faster then VS and
msbuild freeorion.sln /p:Configuration=Release /p:Platform=x64 is working so far (it's still compiling).

Edit: it worked

Post Reply