gtkmm build error using autotools

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I've started to learn gtkmm programming, but am stuck at the first step. I'm using GNOME builder IDE and Ubuntu 17.10 64bit.



Gnome has a nice tutorial for gtkmm, but building the code returns an error in builder!



Problem:

According to the tutorial, the source code must be compiled by g++, while builder uses gcc, since the file name is main.c.



mohammad@Artful-K43SD:~/Projects/test/src$ g++ main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
mohammad@Artful-K43SD:~/Projects/test/src$ gcc main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.



make V=0 -j4 all
make all-recursive
make[1]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Making all in data
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
Making all in src
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
CC test-main.o
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from /home/mohammad/Projects/test/src/main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.
make[2]: *** [test-main.o] Error 1
Makefile:481: recipe for target 'test-main.o' failed
make[1]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
make: *** [all] Error 2
Makefile:477: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Makefile:409: recipe for target 'all' failed


I just want to tell autotools to use g++ for .c files instead of gcc. tried edit the configure.ac file in the project folder, but I wasn't successful! The makefile is generated by builder and if I add a .cpp file to project, the makefile won't update!



Is it possible to code gtkmm in builder?










share|improve this question























  • Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
    – steeldriver
    Mar 21 at 16:25










  • like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
    – mohammads
    Mar 21 at 19:45














up vote
0
down vote

favorite












I've started to learn gtkmm programming, but am stuck at the first step. I'm using GNOME builder IDE and Ubuntu 17.10 64bit.



Gnome has a nice tutorial for gtkmm, but building the code returns an error in builder!



Problem:

According to the tutorial, the source code must be compiled by g++, while builder uses gcc, since the file name is main.c.



mohammad@Artful-K43SD:~/Projects/test/src$ g++ main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
mohammad@Artful-K43SD:~/Projects/test/src$ gcc main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.



make V=0 -j4 all
make all-recursive
make[1]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Making all in data
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
Making all in src
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
CC test-main.o
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from /home/mohammad/Projects/test/src/main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.
make[2]: *** [test-main.o] Error 1
Makefile:481: recipe for target 'test-main.o' failed
make[1]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
make: *** [all] Error 2
Makefile:477: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Makefile:409: recipe for target 'all' failed


I just want to tell autotools to use g++ for .c files instead of gcc. tried edit the configure.ac file in the project folder, but I wasn't successful! The makefile is generated by builder and if I add a .cpp file to project, the makefile won't update!



Is it possible to code gtkmm in builder?










share|improve this question























  • Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
    – steeldriver
    Mar 21 at 16:25










  • like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
    – mohammads
    Mar 21 at 19:45












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've started to learn gtkmm programming, but am stuck at the first step. I'm using GNOME builder IDE and Ubuntu 17.10 64bit.



Gnome has a nice tutorial for gtkmm, but building the code returns an error in builder!



Problem:

According to the tutorial, the source code must be compiled by g++, while builder uses gcc, since the file name is main.c.



mohammad@Artful-K43SD:~/Projects/test/src$ g++ main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
mohammad@Artful-K43SD:~/Projects/test/src$ gcc main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.



make V=0 -j4 all
make all-recursive
make[1]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Making all in data
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
Making all in src
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
CC test-main.o
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from /home/mohammad/Projects/test/src/main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.
make[2]: *** [test-main.o] Error 1
Makefile:481: recipe for target 'test-main.o' failed
make[1]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
make: *** [all] Error 2
Makefile:477: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Makefile:409: recipe for target 'all' failed


I just want to tell autotools to use g++ for .c files instead of gcc. tried edit the configure.ac file in the project folder, but I wasn't successful! The makefile is generated by builder and if I add a .cpp file to project, the makefile won't update!



Is it possible to code gtkmm in builder?










share|improve this question















I've started to learn gtkmm programming, but am stuck at the first step. I'm using GNOME builder IDE and Ubuntu 17.10 64bit.



Gnome has a nice tutorial for gtkmm, but building the code returns an error in builder!



Problem:

According to the tutorial, the source code must be compiled by g++, while builder uses gcc, since the file name is main.c.



mohammad@Artful-K43SD:~/Projects/test/src$ g++ main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
mohammad@Artful-K43SD:~/Projects/test/src$ gcc main.c -o simple `pkg-config gtkmm-3.0 --cflags --libs` -no-pie
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.



make V=0 -j4 all
make all-recursive
make[1]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Making all in data
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/data'
Making all in src
make[2]: Entering directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
CC test-main.o
In file included from /usr/include/glibmm-2.4/glibmm/ustring.h:21:0,
from /usr/include/glibmm-2.4/glibmm/exception.h:22,
from /usr/include/glibmm-2.4/glibmm/error.h:22,
from /usr/include/glibmm-2.4/glibmm/thread.h:47,
from /usr/include/glibmm-2.4/glibmm.h:88,
from /usr/include/gtkmm-3.0/gtkmm.h:87,
from /home/mohammad/Projects/test/src/main.c:1:
/usr/include/glibmm-2.4/glibmm/unicode.h:26:10: fatal error: cctype: No such file or directory
#include <cctype>
^~~~~~~~
compilation terminated.
make[2]: *** [test-main.o] Error 1
Makefile:481: recipe for target 'test-main.o' failed
make[1]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host/src'
make: *** [all] Error 2
Makefile:477: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/mohammad/.cache/gnome-builder/builds/test/default-local-host'
Makefile:409: recipe for target 'all' failed


I just want to tell autotools to use g++ for .c files instead of gcc. tried edit the configure.ac file in the project folder, but I wasn't successful! The makefile is generated by builder and if I add a .cpp file to project, the makefile won't update!



Is it possible to code gtkmm in builder?







gnome gtk autotools gnome-builder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 19:07









Zanna

48.1k13119228




48.1k13119228










asked Mar 21 at 14:58









mohammads

1,10921016




1,10921016











  • Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
    – steeldriver
    Mar 21 at 16:25










  • like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
    – mohammads
    Mar 21 at 19:45
















  • Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
    – steeldriver
    Mar 21 at 16:25










  • like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
    – mohammads
    Mar 21 at 19:45















Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
– steeldriver
Mar 21 at 16:25




Do you really need to call the file main.c - rather than (for example) main.cc or main.cpp? it seems like you are making things harder than they need to be.
– steeldriver
Mar 21 at 16:25












like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
– mohammads
Mar 21 at 19:45




like I said, for every .cc or .cpp files, I have to change makefile and some configurations, and builder(GNOME Application autotools) generate makefile with .c file :(
– mohammads
Mar 21 at 19:45















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017968%2fgtkmm-build-error-using-autotools%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017968%2fgtkmm-build-error-using-autotools%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Trouble downloading packages list due to a “Hash sum mismatch” error

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Cutting all the characters after the last /