|
From: Joni S. <dg...@we...> - 2024-10-03 09:20:34
|
Well, that's kinda strange: the described linking error occurs only when rebuilding osg, sg and fg with "--config RelWithDebInfo". When building everything with "--config Release", everything works correctly. Am 10/2/2024 um 11:48 PM schrieb Josh Davidson: > I would like to report I can still build FG no problem here (Win11x64). > > Please let me know if there is anything I can do help you guys narrow > it down. > > Kind Regards, > > -- > Josh Davidson > ------------------------------------------------------------------------ > *From:* Joni Sch via Flightgear-devel > <fli...@li...> > *Sent:* Wednesday, October 2, 2024 16:44 > *To:* fli...@li... > <fli...@li...> > *Cc:* Joni Sch <dg...@we...> > *Subject:* Re: [Flightgear-devel] Requesting assistance with build > > Hi together, > > when building flightgear with "cmake --build . --config Debug --target > INSTALL", then it compiles as expected (but runs VERY slow od course). > > But when building flightgear with "cmake --build . --config > RelWithDebInfo --target INSTALL", then this error also occurs for me: > > pui.lib(puValue.obj) : error LNK2019: unresolved external symbol > __imp_strncat referenced in function "protected: void__cdecl > puValue::copy_stringval(char const *)" > (?copy_stringval@puValue@@IEAAXPEBD@Z) > [F:\git\flightgear-build\src\Main\fgfs.vcxproj] > F:\git\flightgear-build\src\Main\RelWithDebInfo\fgfs.exe : fatal error > LNK1120: 1 unresolved externals > [F:\git\flightgear-build\src\Main\fgfs.vcxproj] > > > For each build type, I did a complete clean rebuild of osg, simgear > and flightgear. > > Does anyone have an idea what the problem might be? > > Thanks in advance and have a nice day > > Jonathan > > > > Am 9/26/2024 um 5:46 PM schrieb Rhys Ackerman: >> Hey, >> >> Just jumping in here, I also have this same issue. Haven't been able >> to narrow down the cause yet. >> >> ```pui.lib(puValue.obj) : error LNK2019: unresolved external symbol >> __imp_strncat referenced in function "protected: void __cdecl >> puValue::copy_stringval(char const *)" >> (?copy_stringval@puValue@@IEAAXPEBD@Z) >> [C:\Users\Rhys.A\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> C:\Users\Rhys.A\FlightGearBuild\flightgear-build\src\Main\RelWithDebInfo\fgfs.exe >> : fatal error LNK1120: 1 unresolved externals >> [C:\Users\Rhys.A\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj]``` >> >> I know Josh doesn't have this issue, But i am not sure where to look >> to troubleshoot it - I know PLIB is found when configuring FG >> >> Rhys >> >> On Thu, 26 Sept 2024 at 16:34, Nonlinersound via Flightgear-devel >> <fli...@li... >> <mailto:fli...@li...>> wrote: >> >> Hello everyone, >> >> >> I am also trying to compile on a new Windows machine, using the >> wiki page Building using CMake - Windows – FlightGear wiki >> <https://wiki.flightgear.org/Building_using_CMake_-_Windows> >> >> >> Like Josh I experienced the boost problem and after applying >> James's changes to the CMakeList.txt files and removing all build >> artifacts, I successfully built everything, except >> flightgear/Main, specifically fgfs.exe. >> >> >> My setup is similar: VS2022, MSVC 143, Win11 SDK 10.0.22000.0, >> cmake version 3.30.3 and Qt5.15.2. I followed the script on the >> wiki page. >> >> For osg I got the branch fgfs-osg-36-2 as it got the latest changes. >> >> >> The error is happening at link stage when linking fgfs.exe as >> part of flightgear. Here is my output: >> >> >> Building Custom Rule >> C:/Users/Kniffo/Documents/Development/Flightgear/FlightGearBuild/flightgear/src/Main/CMakeLists.txt >> bootstrap.cxx >> NasalUnitTesting.cxx >> NasalSys.cxx >> sentryIntegration.cxx >> C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear\src\Main\sentryIntegration.cxx(257,28): >> warning C4101: 'e': unreferenced local variable >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\fligh >> tgear-build\src\Main\fgfs.vcxproj] >> Generating Code... >> Creating library >> C:/Users/Kniffo/Documents/Development/Flightgear/FlightGearBuild/flightgear-build/src/Main/RelWithDebInfo/fgfs.lib >> and object >> C:/Users/Kniffo/Documents/Development/Flightgear/FlightGearBuild/flightgear-build/src/M >> ain/RelWithDebInfo/fgfs.exp >> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of >> other libs; use /NODEFAULTLIB:library >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by 'ul.lib(ulError.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj >> ] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puGroup.obj)' in function '"public: virtual void __cdecl >> puGroup::recalc_bbox(void)" (?recalc_bbox@puGroup@@UEAAXXZ)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puMenuBar.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxp >> roj] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puPopupMenu.obj)' in function '"public: void __cdecl >> puObject::setStyle(int)" (?setStyle@puObject@@QEAAXH@Z)' [C:\Use >> rs\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puListBox.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxp >> roj] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by 'pui.lib(pu.obj)' in >> function '"public: virtual int __cdecl >> puObject::isHit(int,int)const " (?isHit@puObject@@UEBAHHH@Z)' [C:\ >> Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puObject.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxpr >> oj] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puValue.obj)' in function '"int __cdecl strtoint(char >> const *)" (?strtoint@@YAHPEBD@Z)' [C:\Users\Kniffo\Documents\De >> velopment\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'pui.lib(puInterface.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vc >> <http://fgfs.vc/> >> xproj] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'puAux.lib(puAuxLargeInput.obj)' in function 'sprintf' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\fligh >> tgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'puAux.lib(puAuxComboBox.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgf >> s.vcxproj] >> LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'puAux.lib(puAuxSelectBox.obj)' in function '"public: __cdecl >> puInput::puInput(int,int,int,int)" (??0puInput@@QEAA@HHHH@Z)' [C >> :\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined >> in 'libucrt.lib(output.obj)' is imported by >> 'puAux.lib(puAuxList.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vc >> <http://fgfs.vc/> >> xproj] >> LINK : warning LNK4217: symbol 'strchr' defined in >> 'libvcruntime.lib(strchr.obj)' is imported by >> 'puAux.lib(puAuxLargeInput.obj)' in function '"public: void >> __cdecl puaLargeInput::addNewLine(char const *)" >> (?addNewLine@puaLargeInput@@Q >> EAAXPEBD@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol 'strchr' defined in >> 'libvcruntime.lib(strchr.obj)' is imported by >> 'pui.lib(puInput.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol 'strchr' defined in >> 'libvcruntime.lib(strchr.obj)' is imported by 'ul.lib(ul.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'strtod' defined in >> 'libucrt.lib(strtod.obj)' is imported by 'pui.lib(puValue.obj)' >> in function '"protected: void __cdecl puValue::re_eval(void)" >> (?re_eval@puValue@@IEAAXXZ)' [C:\Users\Kniffo\Documents\De >> velopment\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'strtol' defined in >> 'libucrt.lib(strtox.obj)' is imported by 'pui.lib(puValue.obj)' >> in function '"int __cdecl strtoint(char const *)" >> (?strtoint@@YAHPEBD@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightg >> ear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'isspace' defined in >> 'libucrt.lib(_ctype.obj)' is imported by 'pui.lib(puValue.obj)' >> in function '"int __cdecl strtoint(char const *)" >> (?strtoint@@YAHPEBD@Z)' [C:\Users\Kniffo\Documents\Development\Flight >> gear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'strncpy' defined in >> 'libucrt.lib(strncpy.obj)' is imported by 'pui.lib(puInput.obj)' >> in function '"public: virtual int __cdecl >> puInput::checkKey(int,int)" (?checkKey@puInput@@UEAAHHH@Z)' >> [C:\Users\Kniffo >> \Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4286: symbol 'strncpy' defined in >> 'libucrt.lib(strncpy.obj)' is imported by 'ul.lib(ul.obj)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '_finite' defined in >> 'libucrt.lib(_finite.obj)' is imported by 'sg.lib(sg.obj)' in >> function '"void __cdecl sgQuatToAngleAxis(float *,float * >> const,float const * const)" (?sgQuatToAngleAxis@@YAXPEAMQEAMQEB >> M@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '_isnan' defined in >> 'libucrt.lib(ieeemisc.obj)' is imported by 'sg.lib(sg.obj)' in >> function '"void __cdecl sgQuatToAngleAxis(float *,float * >> const,float const * const)" (?sgQuatToAngleAxis@@YAXPEAMQEAMQEB >> M@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '__acrt_iob_func' defined in >> 'libucrt.lib(_file.obj)' is imported by 'ul.lib(ulError.obj)' in >> function '"void __cdecl ulSetError(enum ulSeverity,char const >> *,...)" (?ulSetError@@YAXW4ulSeverity@@PEBDZZ)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '__stdio_common_vfprintf' defined >> in 'libucrt.lib(output.obj)' is imported by 'ul.lib(ulError.obj)' >> in function 'fprintf' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build >> \src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'exit' defined in >> 'libucrt.lib(exit.obj)' is imported by 'ul.lib(ulError.obj)' in >> function '"void __cdecl ulSetError(enum ulSeverity,char const >> *,...)" (?ulSetError@@YAXW4ulSeverity@@PEBDZZ)' [C:\Users\Kn >> iffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol 'strncmp' defined in >> 'libucrt.lib(strncmp.obj)' is imported by 'ul.lib(ul.obj)' in >> function '"void __cdecl ulFindFile(char *,char const *,char const >> *,char const *)" (?ulFindFile@@YAXPEADPEBD11@Z)' [C:\Us >> ers\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '_stat64i32' defined in >> 'libucrt.lib(stat.obj)' is imported by 'ul.lib(ul.obj)' in >> function '"int __cdecl recursiveFindFileInSubDirs(char *,char >> const *,char const *)" (?recursiveFindFileInSubDirs@@YAHPEA >> DPEBD1@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> LINK : warning LNK4217: symbol '_getcwd' defined in >> 'libucrt.lib(getcwd.obj)' is imported by 'ul.lib(ul.obj)' in >> function '"char * __cdecl ulGetCWD(char *,int)" >> (?ulGetCWD@@YAPEADPEADH@Z)' >> [C:\Users\Kniffo\Documents\Development\Flightg >> ear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> pui.lib(puValue.obj) : error LNK2019: unresolved external symbol >> __imp_strncat referenced in function "protected: void __cdecl >> puValue::copy_stringval(char const *)" >> (?copy_stringval@puValue@@IEAAXPEBD@Z) [C:\Users\Kniffo\Documents\Dev >> elopment\Flightgear\FlightGearBuild\flightgear-build\src\Main\fgfs.vcxproj] >> C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightgear-build\src\Main\RelWithDebInfo\fgfs.exe >> : fatal error LNK1120: 1 unresolved externals >> [C:\Users\Kniffo\Documents\Development\Flightgear\FlightGearBuild\flightge >> ar-build\src\Main\fgfs.vcxproj] >> >> >> So, LNK4217 and LNK4286 shouldn't be a problem but might make the >> code run slower but without braking it. >> >> But it seems that the linker gets confused as it cannot find >> copy_stringval. >> >> >> It is part of plib and exposed by pu.h. >> >> It is also defined in flightgear\src\GUI\FlightGear_pu.h the same >> way as in pu.h. >> >> >> Might this confuse the linker as nothing with this function >> signature is linked to the object? >> >> >> I am sorry if my questions might sound a little stupid but I have >> done C++ last time 10 years ago, tried to build fligtgear for the >> first time and don't know CMAKE. >> >> I plan on re-learing everything I need and wanted to start off by >> building the project first and hit this little stpping stone here. >> >> >> Could someone maybe hint me at what I might have done wrong along >> the way? >> >> >> Thanks a lot, >> >> Carsten >> >> >> >> Am 11.09.2024 um 08:48 schrieb Josh Davidson: >>> Hi, >>> I've recently switched to a new machine and set everything up >>> again with the latest version of VS2022, MSVC 143, WinSDK 22621, >>> CMake 3.30, and Qt5.12. >>> >>> After fresh cloning and build attempts, I am getting stuck at this: >>> >>> CMake Error at CMakeLists.txt:283 (find_package): >>> By not providing "FindBoost.cmake" in CMAKE_MODULE_PATH this >>> project has >>> asked CMake to find a package configuration file provided by >>> "Boost", but >>> CMake did not find one. >>> >>> Could not find a package configuration file provided by >>> "Boost" with any of >>> the following names: >>> >>> BoostConfig.cmake >>> boost-config.cmake >>> >>> Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set >>> "Boost_DIR" to a directory containing one of the above files. >>> If "Boost" >>> provides a separate development package or SDK, be sure it has >>> been >>> installed. >>> >>> I'm also getting a ton of could not find errors right at the >>> beginning of the build script, such as: >>> >>> -- Could NOT find Jasper (missing: JASPER_LIBRARIES >>> JASPER_INCLUDE_DIR) >>> -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY >>> LIBXML2_INCLUDE_DIR) >>> -- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) >>> (found version "GDAL_VERSION-NOTFOUND") >>> >>> I have been unable to understand what is going on - other than >>> that boost is part of the windows-3rd-party repo. >>> >>> My paths in BUILDFG.bat are correct. >>> >>> Anyone have any ideas on how I could resolve this? >>> >>> On a side note, there is also this which I don't recall seeing >>> before: >>> >>> CMake Deprecation Warning at CMakeLists.txt:16 >>> (CMAKE_MINIMUM_REQUIRED): >>> Compatibility with CMake < 3.5 will be removed from a future >>> version of >>> CMake. >>> >>> Update the VERSION argument <min> value or use a ...<max> >>> suffix to tell >>> CMake that the project does not need compatibility with older >>> versions. >>> >>> Thank you. >>> >>> -- >>> Josh Davidson >>> >>> >>> _______________________________________________ >>> Flightgear-devel mailing list >>> Fli...@li... <mailto:Fli...@li...> >>> https://lists.sourceforge.net/lists/listinfo/flightgear-devel <https://lists.sourceforge.net/lists/listinfo/flightgear-devel> >> _______________________________________________ >> Flightgear-devel mailing list >> Fli...@li... >> <mailto:Fli...@li...> >> https://lists.sourceforge.net/lists/listinfo/flightgear-devel >> <https://lists.sourceforge.net/lists/listinfo/flightgear-devel> >> >> >> >> _______________________________________________ >> Flightgear-devel mailing list >> Fli...@li... <mailto:Fli...@li...> >> https://lists.sourceforge.net/lists/listinfo/flightgear-devel <https://lists.sourceforge.net/lists/listinfo/flightgear-devel> > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virenfrei.www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > > > > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft. www.avast.com |