Error building: "Product not found for target..."
Trying to build I am getting a "Product not found for target Blah" where Blah is the name of the project.
I know nothing about CMake. I assumed the IDE would automatically make valid CMake files. Is this not true? Do I need to learn CMake and create these CMake files by hand?
I looked in the CMake file and it lists "main.cpp" viz:
cmake_minimum_required(VERSION 3.1)
project(Featurizer)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(Featurizer ${SOURCE_FILES} featurizer.c getopt.h getopt.cpp)
There is no "main.cpp" in my project. Why is it in my make file?
I started the project as empty (one of the choices) and added three source code files from scratch.
Please sign in to leave a comment.
Hi John.
If you delete main.cpp you can delete SOURCE_FILES variable (with set command):
set(SOURCE_FILES main.cpp)and also edit add_executable command:
add_executable(Featurizer featurizer.c getopt.h getopt.cpp)So your CMakeLists.txt may be the following:
After the editing you should reload CMake.
I am struggling with the same problem, but with a little twist ... I am adding a new target ... and it does not work ...
This is my current CMakefile ...
As you can see I have just added a new executable with its source files and some specific include directories ... but I still cant compile.
"Product not found for target ... " error is appearing in my configuration window and I do not know what to do to solve it....
Any Help will be appreciated
Hi!
Could you please send us your project to clion-support at jetbrains.com so we can take a look at the problem on our side (without eojojos folder if it is possible).