Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6833159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:56:41+00:00 2026-05-26T22:56:41+00:00

So I was merrily learning GTK+ programming with 3.0 in Ubuntu 11.04, and even

  • 0

So I was merrily learning GTK+ programming with 3.0 in Ubuntu 11.04, and even got a working ruler program running. It compiled with my makefile perfectly.

I took some time away from it, upgraded to 11.10, and now have come back to it. But, alas, when I try to build the program, I get a lot of “undefined reference” errors to pretty much every gtk call in my program. Compiling is fine – the issue is at link time.

The project can be found here: https://github.com/zjmichen/ruler

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:56:42+00:00Added an answer on May 26, 2026 at 10:56 pm

    I’ve tested it and it compiled fine.

    superman@superman-mint ~/work/zjmichen-ruler-e783fe1 $ make
    gcc -c -Wall `pkg-config --cflags --libs gtk+-3.0` main.c
    gcc -c -Wall `pkg-config --cflags --libs gtk+-3.0` window.c
    gcc -c -Wall `pkg-config --cflags --libs gtk+-3.0` graphics.c
    gcc -c -Wall `pkg-config --cflags --libs gtk+-3.0` mouse.c
    gcc `pkg-config --cflags --libs gtk+-3.0` main.o window.o graphics.o mouse.o -o zruler
    superman@superman-mint ~/work/zjmichen-ruler-e783fe1 $
    

    But this was on Linux Mint. Here you’ve got the arguments produced by pkg-config

    -pthread -DGSEAL_ENABLE -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-3.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1  -pthread -L/usr/lib/x86_64-linux-gnu -lgtk-3 -lgdk-3 -latk-1.0 -lcairo-gobject -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 
    

    I’ve also did a quick test on Ubuntu 11.10 and indeed it doesn’t compile. I’ll take a better look this evening.

    So I did test it on Ubuntu and changed the line 14 in the makefile to

    $(CC) $(OBJS) $(GTKFLAGS) -o $(NAME)
    

    this changes the order of object files and libraries that are being linked. I have no idea why this problem occurs on the new Ubuntu. Maybe it is because it is a different version of gcc. On my linux mint gcc is version 4.5.2 on ubuntu 11.10 it is 4.6.1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just merrily working on a CakePHP site and suddenly... white screen of
I've got two applications running on two different machines that communicate by sending Serializable
I've finally joined the 21st century and got a second monitor. I can merrily
We are working on using a 3rd party's ActiveX control within a web page.
The answer to this has got to be simple, but I sure don't see
I'm making a to-do list thingy in my spare time for learning etc. I'm
The CORE documentation has shown me how to merrily mock various built Perl functions.
Suppose I've an empty list L. Currently if I run L.front(), it will merrily
I've been doing alot of searching around the website but not even sure if
When working in Struts2, it is just too easy to create a template and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.