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 6548559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:59:07+00:00 2026-05-25T11:59:07+00:00

I’m trying to create my first vala and first autotools supported project. Everything actually

  • 0

I’m trying to create my first vala and first autotools supported project. Everything actually works after following a tutorial online, but when gcc compiler kicks in to compile my program i get the error “glib.h not found”.

first off, can’t just autotools use valac as a compiler instead of creating the .c files and then run gcc? (cause running valac directly works perfectly)

If I can’t configure autotools to just run valac instead of valac -c and then gcc, how would I go about solving this problem?

configure.ac:

AC_PREREQ([2.68])
AC_INIT([Scraps], [0.1], [Scraps])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AC_PROG_CC
AM_PROG_VALAC
AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT

Makefile.am in ./src/:

scrapsdir=../
scraps_PROGRAMS=scraps
scraps_SOURCES=main.vala

Thanks!

  • 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-25T11:59:08+00:00Added an answer on May 25, 2026 at 11:59 am

    As you said, autotools just runs valac -C and then run gcc. This is actually a good thing since everything is the same as with C. Any autotools documentation (including frustrated mailing list and stack overflow posts) you can find applies, so it’s pretty easy to find an answer to anything just by googling the problem.

    In your configure.ac you need something like:

    PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0)
    AC_SUBST(GLIB_LIBS)
    AC_SUBST(GLIB_CFLAGS)
    

    Then in your Makefile.am, something like:

    scraps_LDFLAGS = $(GLIB_LIBS)
    scraps_CFLAGS = $(GLIB_CFLAGS)
    

    You can use http://gitorious.org/sqlheavy as an example. There are executables in examples/ and utils/, and a library in sqlheavy/, so it’s fairly complete.

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

Sidebar

Related Questions

I am trying to create my first Windows Service, but so sad... after I
I'm trying to create my first mysql stored procedure, but script doesn't work due
I'm trying to create my first application for facebook using MVC, but can't decide
I am going to create my first open source project and I am trying
I'm trying to create my first test application with NHibernate following example in NHibernate
I'm trying to create my first application using Django. I'm using the following code
I am trying to create my first webservice. I've been googling for a tutorial
Trying to create my first iPhone app that would play back audio. When I
I am trying to create my first custom Print Dialog in C#. I found
I'm trying to create my first data mart. I am creating my dimension table

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.