Page 1 of 1

Basic example with gtkmm, cant get it to compile

Posted: Sat Jan 23, 2016 2:47 am
by dom11990
Hello all,

This is my first attempt with CodeLite and I'm trying to just get the basic gtkmm3-0 project to run. However, I get the following build error

Code: Select all

C:\Windows\system32\cmd.exe /C C:/msys64/usr/bin/make.exe -e -f  Makefile
----------Building project:[ deleteme - Debug ]----------
make[1]: pkg-config: Command not found
make[1]: pkg-config: Command not found
make[1]: Entering directory '/c/Users/dom/Documents/Main/deleteme'
C:/msys64/mingw64/bin/g++.exe  -c  "C:/Users/dom/Documents/Main/deleteme/mainwindow.cpp" -g -Wall -O0   -o ./Debug/mainwindow.cpp.o -I. -I.
In file included from C:/Users/dom/Documents/Main/deleteme/mainwindow.cpp:1:0:
C:/Users/dom/Documents/Main/deleteme/mainwindow.h:4:26: fatal error: gtkmm/button.h: No such file or directory
compilation terminated.
make[1]: *** [Debug/mainwindow.cpp.o] Error 1
deleteme.mk:98: recipe for target 'Debug/mainwindow.cpp.o' failed
make[1]: Leaving directory '/c/Users/dom/Documents/Main/deleteme'
make: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====2 errors, 1 warnings====
Under Project Settings I have the following for compiler options:

Code: Select all

-g;-Wall;-O0;$(shell pkg-config --cflags gtkmm-3.0)
I had installed MSYS2 and gtkmm via the msys console. Putting pkg-config --cflags gtkmm-3.0 into this window returns the desired include files/directories. Obviously this is not working in CodeLite because it is not using this shell. I would really prefer to use pkg-config and not have to add each include by hand. How do I set this up properly? I've tried searching for tutorials but they got me to where I am now :) Any help would be greatly appreciated.

Cheers,
dom

Re: Basic example with gtkmm, cant get it to compile

Posted: Sat Jan 23, 2016 2:53 am
by eranif
Run CodeLite form within the MSYS terminal

Eran