Toolchains - tools not found on windows 8.1
Hi,
I've intalled Clion 1.0.4 and it installed correctl on Windows 8.1 but in the toochain section I get the following:
Found MinGW
Found Cmake:3.2.2
Not found make
Not found C compiler
Not found C++ compiler
Why can't Clion find the compilers if it said that it found MinGW.
Thanks in advace for any help.
Please sign in to leave a comment.
Hi Charles.
Could you please check that in addition to MinGW you also have installed make, gcc and g++ from the MinGW packages.
Thanks.
What I had installed was gcc from Equation Solution which is just gcc and gdb.
I'll intstall the proper MinGW and try again.
Thanks again for your help.
Hi,
I've now installed Clion on a Ubuntu platform and all the tools were found.
My company has asked me to review the product and give feedback on ease of use etc.
Currently I'm using Eclipse and first impressions are that Clion is much more difficult to set up a project.
The help section is not that good especially when setting up complex projects.
And why in this day and age do we have to write to make files when Eclipse uses menus and generates
its own makefiles.
Appart from all this I'm having problems setting up a simple project with the simple main.cpp provided by default.
I want my build to go in my project directory so I did this:
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/build/")
Hi Charles.
Setting your build directory in the non-default location is not supported yet and we don't have any plans to implement it in the nearest future.
In general it's not possible with CMake.
Locations of the System directory can be modified in CLion_home\bin\idea.properties file.
You will need to adjust idea.system.path parameter. Please find out more information here and also in our tracker.
As for your second question:
You can try to add all files from your project like this:
file(GLOB_RECURSE sources "*.cpp")
and then add ${sources} variable to your target.
It is usually not recommended to use GLOB for adding files because there is no way for CLion or CMake to know when the project should be re-generated.
For example:
set(HEADERS a.h b.h)
set(SOURCES a.cpp b.cpp)
add_executable(target_name ${HEADERS} ${SOURCES})
As for the question with static library - you can describe what libraries are you linking using find_package + target_link_libraries commands.
Hi Anna,
Thanks for your help.
I will try your suggestions in due course.
Hi there,
If you just want to change the output of the resulting binary use:
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${<projectname>_SOURCE_DIR}/build")
Where <projectname> is the defined project name.
For a tutorial I am doing that would be:
Kind regards,
Viktor
P.S. It takes some time to get even the simplest program running, but if you have a working CMakeList.txt you can easily expand.