Author Topic: use CMake with CodeBlocks  (Read 7989 times)

Offline pasparis

  • Single posting newcomer
  • *
  • Posts: 5
use CMake with CodeBlocks
« 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





Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: use CMake with CodeBlocks
« Reply #1 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

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

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline pasparis

  • Single posting newcomer
  • *
  • Posts: 5
Re: use CMake with CodeBlocks
« Reply #2 on: February 19, 2012, 10:01:20 am »
thank you I am going to see what is suggested in the link