Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: pasparis on February 18, 2012, 03:27:20 pm

Title: use CMake with CodeBlocks
Post by: pasparis on February 18, 2012, 03:27:20 pm
I have a problem trying to use CMake with CodeBlocks

I do the following things(thanks to the cmake mail list which helped me)

-create a folder pCMake
-put the cmakelists file in it
        cmake_minimum_required(VERSION 2.8)
        project(pCMake)
        add_executable(pCMake main.cpp)

-put a main.cpp print "hello"

then in the cmake-gui interface
source code : c:/pCMake
binaries : c:/pCMake

then execute the Generate

it creates the pCMake codeblocks project,then project->properties->Build targets Type console application
and then when I want to built/Run I get the message
it seems that this project has not been built yet.do you want to built it now? answser yes
it builts but if I want to run it says again the same message "it seems that ..."

I don't understand why, any suggestions would be helpful
pascal




Title: Re: use CMake with CodeBlocks
Post by: stahta01 on February 18, 2012, 04:20:58 pm
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

No idea if above works for CB Makefile projects which is likely what CMake creates.

Tim S.
Title: Re: use CMake with CodeBlocks
Post by: pasparis on February 19, 2012, 10:01:20 am
thank you I am going to see what is suggested in the link