SGL-UT / GPSTk

ATTENTION: This repository has been moved and is for archival purposes only. GPSTk toolkit has been renamed to GNSSTK and has been split into two new separate repositories. GNSSTK now only contains libraries while the other repository GNSSTK-APPS contains only applications. The rename and split into libraries and applications started with version v12.0.0 on September 2021. GPSTk --> GNSSTK at https://gitlab.com/sgl-ut/gnsstk --> GNSSTK-APPS at https://gitlab.com/sgl-ut/gnsstk-apps
Other
339 stars 182 forks source link

Logstream kludge not working in Mingw/Msys2 Build #29

Closed xaedes closed 3 years ago

xaedes commented 7 years ago

I get following compilation error while compiling under Mingw/Msys2:

[ 97%] Linking CXX executable PRSolve.exe
../../../libgpstk.a(CommandLine.cpp.obj):CommandLine.cpp:(.data+0x0): multiple definition of `Log<ConfigureLOGstm>::reportingLevel'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.data+0x0): first defined here
../../../libgpstk.a(CommandLine.cpp.obj):CommandLine.cpp:(.bss+0x0): multiple definition of `Log<ConfigureLOGstr>::dumpTimeTags'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.bss+0x0): first defined here
../../../libgpstk.a(CommandLine.cpp.obj):CommandLine.cpp:(.bss+0x1): multiple definition of `Log<ConfigureLOGstr>::dumpLevels'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.bss+0x1): first defined here
../../../libgpstk.a(PRSolution.cpp.obj):PRSolution.cpp:(.data+0x0): multiple definition of `Log<ConfigureLOGstre::reportingLevel'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.data+0x0): first defined here
../../../libgpstk.a(PRSolution.cpp.obj):PRSolution.cpp:(.bss+0x0): multiple definition of `Log<ConfigureLOGstrea:dumpTimeTags'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.bss+0x0): first defined here
../../../libgpstk.a(PRSolution.cpp.obj):PRSolution.cpp:(.bss+0x1): multiple definition of `Log<ConfigureLOGstrea:dumpLevels'
CMakeFiles/PRSolve.dir/objects.a(PRSolve.cpp.obj):PRSolve.cpp:(.bss+0x1): first defined here
collect2.exe: error: ld returned 1 exit status

The logstream.hpp kludge is applied because I compile in windows. But under Mingw this is not necessary and actually causes above compilation error.