0
votes

I created eclipse project files for a c++ project with cmake -G"Eclipse CDT4 - Unix Makefiles".

I cant find the option to change the toolchain anymore because C++ Builder is not listed, only c++ General can be viewed in Eclipse.

Because I dont have the toolchain set right it is not able to find the STL, meaning string, vector etc.. is not found (type string is unresolved).

How can I fix this?

1

1 Answers

0
votes

I found out how to fix this.

First I removed my build directory and recreated it with mkdir build.

Edited the CMakeLists.txt by adding the toolchain like this:

SET(CMAKE_C_COMPILER "/usr/bin/gcc") 
SET(CMAKE_C_COMPILER_ARG1 "") 
SET(CMAKE_C_COMPILER_ID "GNU") 
SET(CMAKE_C_PLATFORM_ID "Linux")

After that I used the cmake command *cmake .. -G"Eclipse CDT4 - Unix Makefiles" from withing the build directory.

My STL library are now found as i wanted without errors everything build succesfully.

Hopefully I helped someone out.