gtkmm build error using autotools

Clash 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?
gnome gtk autotools gnome-builder
add a comment |Â
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?
gnome gtk autotools gnome-builder
Do you really need to call the filemain.c- rather than (for example)main.ccormain.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
add a comment |Â
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?
gnome gtk autotools gnome-builder
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
gnome gtk autotools gnome-builder
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 filemain.c- rather than (for example)main.ccormain.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
add a comment |Â
Do you really need to call the filemain.c- rather than (for example)main.ccormain.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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Do you really need to call the file
main.c- rather than (for example)main.ccormain.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