The C++ compiler is not able to compile a simple program / 'sttdef.h' no such file or directory
-
So,when i create a new project i get the The C++ compiler is not able to compile a simple program error like this ;
So i found a solution to this by simply addingset(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
before my project name and after that i am getting 'sttdef.h' no such file or directory error after i try to run the project like this;
My settings;
My visual studio installer settings;
My main purpose is to link OpenCV and make a UI for an engineering project with Qserial.At some point i managed to link OpenCV to Qt but these 2 errors are holding me back for a couple of days now.Any help is appreciated.
-
So,when i create a new project i get the The C++ compiler is not able to compile a simple program error like this ;
So i found a solution to this by simply addingset(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
before my project name and after that i am getting 'sttdef.h' no such file or directory error after i try to run the project like this;
My settings;
My visual studio installer settings;
My main purpose is to link OpenCV and make a UI for an engineering project with Qserial.At some point i managed to link OpenCV to Qt but these 2 errors are holding me back for a couple of days now.Any help is appreciated.
@barisstark said in The C++ compiler is not able to compile a simple program / 'sttdef.h' no such file or directory:
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
Why
STATIC_LIBRARY
if you dont build one?!
Who told you this? AI?!Seems like your kit / build settings aren't correct. Try with default (initial) parameters.
-
@barisstark said in The C++ compiler is not able to compile a simple program / 'sttdef.h' no such file or directory:
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
Why
STATIC_LIBRARY
if you dont build one?!
Who told you this? AI?!Seems like your kit / build settings aren't correct. Try with default (initial) parameters.
@Pl45m4 thank you for the reply.
I have found the set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY") context here.
and yes using msvc for opencv usage was chatgpt`s suggestion.Im very new to this.
By initial parameters do you mean mingw and ninja?
-
C Christian Ehrlicher moved this topic from General and Desktop