Build problem - missing #include file [message #1830175] |
Sun, 19 July 2020 10:28  |
Eclipse User |
|
|
|
I have essentially two build problems (Eclipse 2020-03)
The following code fails to find
#include "gtkmm.h"
Here is the basic main
#include </usr/include/gtkmm-3.0/gtkmm.h>
#include "gtkmm.h"
#include <gtkmm.h>
int main() {
cout << "GTKMM Start sample code" << endl; // prints Stencil sample code
cout << "GTKMM End sample code" << endl; // prints Stencil sample code
return 0;
}
Here are the errors:
Description Resource Path Location Type
fatal error: glibmm.h: No such file or directory 1_TEST line 87, external location: /usr/include/gtkmm-3.0/gtkmm.h C/C++ Problem
make: *** [src/1_GTKMM.o] Error 1 1_GTKMM C/C++ Problem
make: *** [src/1_TEST.o] Error 1 1_TEST C/C++ Problem
recipe for target 'src/1_GTKMM.o' failed subdir.mk /1_GTKMM/Debug/src line 18 C/C++ Problem
recipe for target 'src/1_TEST.o' failed subdir.mk /1_TEST/Debug/src line 18 C/C++ Problem
unused variable 'argc' [-Wunused-variable] 1_GTKMM.cpp /1_GTKMM/src line 39 C/C++ Problem
unused variable 'argv' [-Wunused-variable] 1_GTKMM.cpp /1_GTKMM/src line 40 C/C++ Problem
initializing argument 2 of 'static Glib::RefPtr<Gtk::Application> Gtk::Application::create(int&, char**&, const Glib::ustring&, Gio::ApplicationFlags)' 1_GTKMM line 353, external location: /usr/include/gtkmm-3.0/gtkmm/application.h C/C++ Problem
My question is
why gtkmm.h cannot be found when full path syntax finds it ?
The second issue is very strange
AFTER I add `pkg-config gtkmm-3.0 --cflags --libs` in Settings → Miscellaneous
I no longer get the failure, project builds and runs, BUT in main cpp file I get
an indicator that the gtkmm.h file still cannot be found.
My full compiler options:
-O0 -g3 -Wall -c -fmessage-length=0 `pkg-config gtkmm-3.0 --cflags --libs` -v
Basically I have an error which is not an error as far as build goes.
My question
Should I care ?
One more
am I putting the backtick string in correct place ?
I am not so sure and have no idea how to verify besides actually using GTK in my code.
[Updated on: Sun, 19 July 2020 10:30] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28934 seconds