'Problem trying to configure and build Ignition Common when installing Gazebo for windows
I am trying to install Gazebo for Windows following this tutorial https://gazebosim.org/tutorials?tut=install_on_windows&cat=install
I have already faced several issues from point 8 in advance, as I had to manually add to "DCMAKE_PREFIX_PATH" in the configure bat files some dependecies as it wasn't able to locate them.
However, I am now in step 10 trying to configure and build Ignition Common, but I get an error when linking.
Here is my configure file:
:: Install dependencies
call %win_lib% :download_unzip_install dlfcn-win32-vc15-x64-dll-MD.zip
call %win_lib% :install_ign_project ign-math ign-math4
:: Set configuration variables
@set build_type=Release
@if not "%1"=="" set build_type=%1
@echo Configuring for build type %build_type%
:: Go to the directory that this configure.bat file exists in
cd /d %~dp0
:: Create a build directory and configure
md build
cd build
cmake .. -G "NMake Makefiles" -DCMAKE_PREFIX_PATH="C:\Users\yimmi\gz-ws\ign-cmake\build\install\Release\lib\cmake;C:\Users\yimmi\gz-ws\ign-math\build\install\Release\lib\cmake\ignition-math4;C:\Users\yimmi\gz-ws\dlfcn-win32-vc15-x64-dll-MD\share\dlfcn-win32" -DCMAKE_INSTALL_PREFIX="%WORKSPACE_INSTALL_DIR%" -DCMAKE_BUILD_TYPE="%build_type%" -DBUILD_TESTING:BOOL=False
:: Note: We disable testing by default. If the intention is for the CI to build and test
:: this project, then the CI script will turn it back on.
:: If the caller wants to build and/or install, they should do so after calling this script
When running it in Visual Studio 2019 Developer Command Prompt i get the following messages
-- The C compiler identification is MSVC 19.29.30141.0
-- The CXX compiler identification is MSVC 19.29.30141.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ignition-common1 version 1.1.1
-- Operating system is Windows
--
-- ====== Finding Dependencies ======
-- Looking for ignition-math4 - found
-- Skipping search for tinyxml2 and using an internal version
-- Found DL: TRUE
-- Looking for libdl - found
CMake Warning (dev) at C:/Users/yimmi/gz-ws/ign-cmake/build/install/Release/lib/cmake/ignition-cmake0/cmake0/IgnUtils.cmake:265 (message):
-- THIS MESSAGE IS INTENDED FOR IGNITION-COMMON AUTHORS --
(IF YOU SEE THIS, PLEASE REPORT IT)
Could not find pkg-config information for DL. It was not provided by the
find-module for the package, nor was it explicitly passed into the call to
ign_find_package(~). This is most likely an error in this project's use of
ign-cmake.
Call Stack (most recent call first):
CMakeLists.txt:62 (ign_find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- -------------------------------------------
-- Adding tinyxml2 source files
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
-- Performing Test COMPILER_HAS_DEPRECATED
-- Performing Test COMPILER_HAS_DEPRECATED - Success
-- Testing is disabled -- skipping UNIT tests
-- Build configuration successful
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Build type: Release
-- Install prefix:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/yimmi/gz-ws/ign-common/build
I think everything worked fine, but then, if I call nmake this is what I get at the end:
[ 97%] Building CXX object src/CMakeFiles/ignition-common1.dir/tinyxml2/tinyxml2.cpp.obj
cl : Línea de comandos warning D9025 : invalidando '/W3' con '/W2'
tinyxml2.cpp
[100%] Linking CXX shared library ignition-common1.dll
LINK: command "C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe /nologo @CMakeFiles\ignition-common1.dir\objects1.rsp /out:ignition-common1.dll /implib:ignition-common1.lib /pdb:C:\Users\yimmi\gz-ws\ign-common\build\src\ignition-common1.pdb /dll /version:1.1 /machine:X86 /INCREMENTAL:NO C:\Users\yimmi\gz-ws\ign-math\build\install\Release\lib\ignition-math4.lib C:\Users\yimmi\gz-ws\dlfcn-win32-vc15-x64-dll-MD\lib\dl.lib psapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:ignition-common1.dll.manifest" failed (exit code 1120) with the following output:
Animation.cc.obj : se encontró .netmodule MSIL o un módulo compilado con /GL; reiniciando la vinculación con /LTCG; agregue /LTCG a la línea de comandos de vínculo para mejorar el rendimiento del vinculador
Creando biblioteca ignition-common1.lib y objeto ignition-common1.exp
PluginLoader.cc.obj : error LNK2001: símbolo externo _dlsym sin resolver
PluginLoader.cc.obj : error LNK2001: símbolo externo _dlerror sin resolver
PluginLoader.cc.obj : error LNK2001: símbolo externo _dlopen sin resolver
ignition-common1.dll : fatal error LNK1120: 3 externos sin resolver
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : código devuelto '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"' : código devuelto '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"' : código devuelto '0x2'
Stop.
Can anybody help me?
Thank you in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
