|
Re: How to use GTK+-3.0 or gtkmm library in Eclipse 2020-03 [message #1830030 is a reply to message #1830002] |
Thu, 16 July 2020 04:20 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
You don't say what kind of CDT project you are trying to use.
Nor have you told us what OS you are using.
Assuming Linux and have pkg-config available:
If you are using a Managed Build project, you need to tell the compiler what include paths to use.
The easiest way is to add `pkg-config --cflags gtk+-3.0 gtkmm-3.0` to the compiler command
and `pkg-config --libs gtk+-3.0 gtkmm-3.0` to the linker command
NOTE: those are surrounded by back-ticks and NOT single quotes.
If it's a Makefile project then you could create variables for them:
GTKCFLAGS:=$(shell pkg-config --cflags gtk+-3.0 gtkmm-3.0)
GTKLFLAGS:=$(shell pkg-config --libs gtk+-3.0 gtkmm-3.0)
Then use these variables in compile and link recipes.
(See the GNU Make manual for the difference between '=' and ':=')
The project I use is based on Autotools and likely won't help you much by showing it to you.
You will also need to tell the Indexer where the headers can be found.
That means manually adding the output from pkg-config to the CDT User Setting Entries of
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entries tab
You may be able to get away with just:
- /usr/include/gtk-3.0
- /usr/include/glibmm-?.?
- /usr/include/gtkmm-3.0
(or wherever pkg-config says they are)
depending on what you are doing.
[Updated on: Thu, 16 July 2020 04:40] Report message to a moderator
|
|
|
|
|
Re: How to use GTK+-3.0 or gtkmm library in Eclipse 2020-03 [message #1830277 is a reply to message #1830002] |
Wed, 22 July 2020 14:41 |
Helen Keller Messages: 173 Registered: June 2019 |
Senior Member |
|
|
According to this 2018-09 is the only 20xx version supporting pkg-config.
It is unclear if one can roll his /hers own.
https://marketplace.eclipse.org/content/pkg-config-support-eclipse-cdt
Eclipse Versions:
Oxygen (4.7), Neon (4.6), Mars (4.5), Luna (4.4), Kepler (4.3), Juno (4.2, 3.8), Previous to Juno (<=4.1), Photon (4.8), 2018-09 (4.9)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03797 seconds