Errors during build process that i dont know how to resolve

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
littlebit
Engineer
Engineer
Posts: 1
Joined: 22 Dec 2023 14:14

Errors during build process that i dont know how to resolve

Post by littlebit »

Hello,

Im using Visual Studio 2022 Community on Windows 11. The version im trying to build is the master from github. As of writing this post the latest commit is c1afbc9.

Ive followed the COMPILING.md and can now build & start the game.

The Problem im running into is the following errors that arise while building:
[+] Spoiler

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1331		
Error (active)	E1696	cannot open source file "table/strings.h"	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	97		
Error (active)	E1696	cannot open source file "table/strings.h"	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport_type.h	15		
Error (active)	E1696	cannot open source file "../table/strings.h"	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\widgets\dropdown_type.h	18		
Error (active)	E0020	identifier "STR_VIEWPORT_TOWN_POP" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1424		
Error (active)	E0020	identifier "STR_VIEWPORT_TOWN" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1424		
Error (active)	E0020	identifier "STR_VIEWPORT_TOWN_TINY_WHITE" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1425		
Error (active)	E0020	identifier "STR_VIEWPORT_TOWN_TINY_BLACK" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1425		
Error (active)	E0020	identifier "STR_WHITE_SIGN" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1434		
Error (active)	E0020	identifier "STR_VIEWPORT_SIGN_SMALL_WHITE" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1435		
Error (active)	E0020	identifier "STR_VIEWPORT_SIGN_SMALL_BLACK" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1435		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1435		
Error (active)	E0020	identifier "STR_VIEWPORT_STATION" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1445		
Error (active)	E0020	identifier "STR_VIEWPORT_STATION_TINY" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1445		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1445		
Error (active)	E0020	identifier "STR_VIEWPORT_WAYPOINT" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1450		
Error (active)	E0020	identifier "STR_VIEWPORT_WAYPOINT_TINY" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1450		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1450		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1475		
Error (active)	E0020	identifier "STR_WHITE_SIGN" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	1715		
Error (active)	E0020	identifier "STR_MEASURE_LENGTH" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	2732		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	2898		
Error (active)	E0020	identifier "STR_MEASURE_LENGTH" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	2898		
Error (active)	E0020	identifier "STR_MEASURE_LENGTH_HEIGHTDIFF" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	2898		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	3242		
Error (active)	E0020	identifier "STR_MEASURE_AREA" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	3242		
Error (active)	E0020	identifier "STR_MEASURE_AREA_HEIGHTDIFF" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport.cpp	3242		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport_type.h	44		
Error (active)	E0020	identifier "STR_NULL" is undefined	cmake_pch.cxx.obj (CMakeFiles\openttd_lib.dir\cmake_pch.cxx.obj) - x64 Debug	OpenTTD\src\viewport_type.h	56
I dont understand why the strings.h isnt being generated since i havent modified the source yet and (at least in my mind) followed proper procedure.

Im very happy to provide further information.
User avatar
littlebit
Engineer
Engineer
Posts: 1
Joined: 22 Dec 2023 14:14

Re: Errors during build process that i dont know how to resolve

Post by littlebit »

ok I will do that.

thanks for your help.

Edit:

defining VCPKG_TARGET_TRIPLET and CMAKE_TOOLCHAIN_FILE correctly in the cmakesettings.json and running "vcpkg integrate install" solved the problem.
Last edited by littlebit on 23 Dec 2023 16:09, edited 1 time in total.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 10 guests