0

I am trying to compile a project with GTKMM, but I get countless errors when I include the GTKMM_INCLUDE_DIRS directory into the project.

The tree is...

Top
⇾ CMakeLists.txt
⇾ src
 ⇾ CMakeLists.txt
 ⇾ main.cpp
 ⇾ DAQ
  ⇾ CMakeLists.txt
  ⇾ DAQControl.cpp
  ⇾ DAQControl.h
 ⇾ DMD
  ⇾ CMakeLists.txt
  ⇾ DMDControl.cpp
  ⇾ DMDControl.h
 ⇾ ConfocalSensor
  ⇾ CMakeLists.txt
  ⇾ ConfocalControl.cpp
  ⇾ ConfocalControl.h

And this is the top level CMakeLists.txt

cmake_minimum_required(VERSION 3.26)

project(FastAblation)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

find_package(PkgConfig)

pkg_check_modules(GTKMM4 REQUIRED gtkmm-4.0)

include_directories(.)
include_directories(lib)

add_subdirectory(src)

message("-- Target Link Libraries")

target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/lib/alp4395.lib)
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/lib/CHRocodile.lib)
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/lib/cbw64.lib)

This is src folder CMakeLists.txt

include_directories(.)

link_directories(${GTKMM4_LIBRARY_DIRS})

include_directories(${GTKMM4_INCLUDE_DIRS})

add_definitions(${GTKMM4_CFLAGS_OTHER})

add_subdirectory(ConfocalSensor)
add_subdirectory(DMD)
add_subdirectory(DAQ)
add_subdirectory(LaserPower)

add_executable(${PROJECT_NAME} main.cpp)

target_link_libraries(${PROJECT_NAME} DMD Confocal DAQ Laser)

And I somehow get an error when I have include_directories(${GTKMM4_INCLUDE_DIRS}) in there.

This is the error!

C:\msys64\mingw64\include\math.h(209,5): error C2065: '__asm__': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(209,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcx
proj]
C:\msys64\mingw64\include\math.h(209,35): error C2143: syntax error: missing ')' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(209,13): error C3861: '__volatile__': identifier not found [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(209,35): error C2143: syntax error: missing ';' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(209,35): error C2059: syntax error: ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(209,57): error C2059: syntax error: ')' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,5): error C2065: '__asm__': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcx 
proj]
C:\msys64\mingw64\include\math.h(220,35): error C2143: syntax error: missing ')' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,13): error C3861: '__volatile__': identifier not found [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,35): error C2143: syntax error: missing ';' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,35): error C2059: syntax error: ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(220,57): error C2059: syntax error: ')' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,5): error C2065: '__asm__': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcx 
proj]
C:\msys64\mingw64\include\math.h(231,35): error C2143: syntax error: missing ')' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,13): error C3861: '__volatile__': identifier not found [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,35): error C2143: syntax error: missing ';' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,35): error C2059: syntax error: ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(231,57): error C2059: syntax error: ')' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1157,7): error C2065: '__asm__': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1157,15): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vc 
xproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2143: syntax error: missing ')' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1157,15): error C3861: '__volatile__': identifier not found [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2143: syntax error: missing ';' before ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2059: syntax error: ':' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\math.h(1158,45): error C2059: syntax error: ')' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(388,16): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(389,16): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(391,16): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(396,27): error C2144: syntax error: 'int' should be preceded by ';' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]       
C:\msys64\mingw64\include\stdlib.h(398,54): error C2381: '_Exit': redefinition; 'noreturn' differs [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(396): message : see declaration of '_Exit' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(399,6): error C3861: '_exit': identifier not found [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(405,16): error C2059: syntax error: '__declspec(noreturn)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(499,18): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(500,17): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(502,23): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(505,25): error C2059: syntax error: '__declspec(nothrow)' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(685,70): error C2144: syntax error: 'int' should be preceded by ';' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\msys64\mingw64\include\stdlib.h(687,49): error C2144: syntax error: 'int' should be preceded by ';' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]       
C:\msys64\mingw64\include\stdlib.h(688,56): error C2144: syntax error: 'int' should be preceded by ';' [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]       
C:\msys64\mingw64\include\malloc.h(127,28): error C2065: '_ALLOCA_S_MARKER_SIZE': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]      
C:\msys64\mingw64\include\malloc.h(146,34): error C2065: '_ALLOCA_S_MARKER_SIZE': undeclared identifier [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]      
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(39,13): error C2039: 'abort': is not a member of '`global namespace'' [C:\Users 
\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(39,1): error C2873: 'abort': symbol cannot be used in a using-declaration [C:\U 
sers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(48,13): error C2039: 'exit': is not a member of '`global namespace'' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(48,1): error C2873: 'exit': symbol cannot be used in a using-declaration [C:\Us 
ers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(60,13): error C2039: 'strtod': is not a member of '`global namespace'' [C:\User 
s\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(60,1): error C2873: 'strtod': symbol cannot be used in a using-declaration [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(76,13): error C2039: 'strtof': is not a member of '`global namespace'' [C:\User 
s\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(76,1): error C2873: 'strtof': symbol cannot be used in a using-declaration [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(77,13): error C2039: 'strtold': is not a member of '`global namespace'' [C:\Use 
rs\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(77,1): error C2873: 'strtold': symbol cannot be used in a using-declaration [C: 
\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(83,13): error C2039: 'quick_exit': is not a member of '`global namespace'' [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(83,1): error C2873: 'quick_exit': symbol cannot be used in a using-declaration  
[C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(893,13): error C2039: 'fpclassify': is not a member of '`global namespace'' [C:\U 
sers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(893,1): error C2873: 'fpclassify': symbol cannot be used in a using-declaration [ 
C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(894,13): error C2039: 'signbit': is not a member of '`global namespace'' [C:\User 
s\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(894,1): error C2873: 'signbit': symbol cannot be used in a using-declaration [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(895,13): error C2039: 'isfinite': is not a member of '`global namespace'' [C:\Use 
rs\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(895,1): error C2873: 'isfinite': symbol cannot be used in a using-declaration [C: 
\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(896,13): error C2039: 'isinf': is not a member of '`global namespace'' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(896,1): error C2873: 'isinf': symbol cannot be used in a using-declaration [C:\Us 
ers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(897,13): error C2039: 'isnan': is not a member of '`global namespace'' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(897,1): error C2873: 'isnan': symbol cannot be used in a using-declaration [C:\Us
ers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(898,13): error C2039: 'isnormal': is not a member of '`global namespace'' [C:\Use 
rs\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(898,1): error C2873: 'isnormal': symbol cannot be used in a using-declaration [C: 
\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(899,13): error C2039: 'isgreater': is not a member of '`global namespace'' [C:\Us 
ers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(899,1): error C2873: 'isgreater': symbol cannot be used in a using-declaration [C 
:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(900,13): error C2039: 'isgreaterequal': is not a member of '`global namespace'' [ 
C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(900,1): error C2873: 'isgreaterequal': symbol cannot be used in a using-declarati 
on [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(901,13): error C2039: 'isless': is not a member of '`global namespace'' [C:\Users 
\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(901,1): error C2873: 'isless': symbol cannot be used in a using-declaration [C:\U 
sers\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(902,13): error C2039: 'islessequal': is not a member of '`global namespace'' [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(902,1): error C2873: 'islessequal': symbol cannot be used in a using-declaration  
[C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(903,13): error C2039: 'islessgreater': is not a member of '`global namespace'' [C 
:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(903,1): error C2873: 'islessgreater': symbol cannot be used in a using-declaratio 
n [C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(904,13): error C2039: 'isunordered': is not a member of '`global namespace'' [C:\ 
Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(904,1): error C2873: 'isunordered': symbol cannot be used in a using-declaration  
[C:\Users\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(909,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(910,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(911,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(912,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(913,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(914,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(915,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(916,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(917,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(918,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(919,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(920,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(921,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(922,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(923,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(924,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(925,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(926,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(927,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(928,29): error C2144: syntax error: 'float' should be preceded by ';' [C:\Users\k 
imym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(929,29): error C2144: syntax error: 'double' should be preceded by ';' [C:\Users\ 
kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cmath(929,36): fatal error C1003: error count exceeds 100; stopping compilation [C:\Use 
rs\kimym\Desktop\FastAblationSystem\build\src\FastAblation.vcxproj]

Is there any suggestion on why this could be happening?

Ryan Lee
  • 37
  • 6
  • 1
    Your forgot to add exact **error message** to the question post, see [ask]. – Tsyvarev May 04 '23 at 06:25
  • 1
    Is there a reason you're not using the nice "imported target" mode of `pkg_check_modules`? – Botje May 04 '23 at 08:34
  • Sorry, I didn't know that the error was too long so I was not thinking to put it on, but I edited it. – Ryan Lee May 06 '23 at 04:18
  • 1
    You are trying to use MimGW headers with MSVC. This won't work. Check your environment variables. Do you have any that specify include directories? Do you have any that specify a C or C++ compiler? – n. m. could be an AI May 06 '23 at 06:02
  • Hi, @n.m. I have `C:\msys64\mingw64\bin` and `C:\Program Files\CMake\bin` as path env. – Ryan Lee May 07 '23 at 22:16
  • @Botje I am not sure what you mean by that. I am fairly new to CMAKE. – Ryan Lee May 08 '23 at 03:54
  • OK, I figured it out! @n.m.'s suggestion was correct. I was using some other compiler tool with VS code than the compiler that I have. – Ryan Lee May 08 '23 at 04:02

0 Answers0