I'm trying to build rtklib using cmake and Visual Studio 2026 (started with 2022, then updated)). I'm running into a few issues. I'm trying to build from main from commit
Merge pull request #887 from ourairquality/msc-strtok
win32 use strtok_s for strtok_r
Date: 1 week ago (6/7/2026 13:21:08)
commit hash 57d39e7
OS:
Edition Windows 10 Enterprise
Version 22H2
Installed on 6/6/2023
OS Build 19045.6456
CMakeCache.txt
Following the `readme.txt file:
1) create a build directory
> mkdir build
> cd build/
2) setup CMake project
> cmake ..
Qt was found and the project was built. However, not everything was built with
cmake --build .
(I don't have make on this system.)
I also commented out the tests from CMakeLists.txt because of errors with missing libraries libm, libblas, and liblapack. This belongs in a separate issue.
# tests
#add_subdirectory(test)
rnx2rtkp.exe and pos2kml.exe get built and put in .../bin/Debug (also ../bin/Release with --config Release ) , but not convbin.exe.
MSBuild version 18.7.8+1ac568fee for .NET Framework
rtklib.vcxproj -> C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\lib\Debug\rtklib.dll
convbin.obj : error LNK2019: unresolved external symbol gmtime_r referenced in function get_filetime [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\consapp\convbin.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\bin\Debug\convbin.exe : fatal error LNK1120: 1 unresolved externals [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\consapp\convbin.vcxproj]
Also, these qtapps don't get built:
- rtknavi_qt
- rtkplot_qt
- rtkpost_qt
- strsvr_qt
The error is the same, so I'll only post for rtknavi_qt:
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65): error C2445: result type of conditional expression is ambiguous: types 'const T' and 'const char [1]' can be converted to multiple common types [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65): error C2445: with [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65): error C2445: [ [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65): error C2445: T=QByteArray [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65): error C2445: ] [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65):
could be 'const T'
with
[
T=QByteArray
]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(126,65):
or 'const char *'
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57): error C2445: result type of conditional expression is ambiguous: types 'const T' and 'const char [1]' can be converted to multiple common types [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57): error C2445: with [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57): error C2445: [ [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57): error C2445: T=QByteArray [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57): error C2445: ] [C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\build\app\qtapp\rtknavi_qt\rtknavi_qt.vcxproj]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57):
could be 'const T'
with
[
T=QByteArray
]
C:\FieldSoftware\GPS_Software\rtklibexplorer\RTKLIB\app\qtapp\appcmn_qt\refdlg.cpp(127,57):
or 'const char *'
Thanks for any help.
CMakeCache.txt
Debug_stderr.txt
I'm trying to build rtklib using cmake and Visual Studio 2026 (started with 2022, then updated)). I'm running into a few issues. I'm trying to build from
mainfrom commitOS:
CMakeCache.txt
Following the `readme.txt file:
Qt was found and the project was built. However, not everything was built with
cmake --build .(I don't have
makeon this system.)I also commented out the tests from
CMakeLists.txtbecause of errors with missing librarieslibm,libblas, andliblapack. This belongs in a separate issue.rnx2rtkp.exeandpos2kml.exeget built and put in.../bin/Debug(also ../bin/Release with--config Release) , but notconvbin.exe.Also, these qtapps don't get built:
The error is the same, so I'll only post for
rtknavi_qt:Thanks for any help.
CMakeCache.txt
Debug_stderr.txt