automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setup for a project with autotools so resulting executables can see


From: Diego Elio Pettenò
Subject: Re: Setup for a project with autotools so resulting executables can see required binary files?
Date: Sat, 14 Mar 2015 19:27:28 +0000

On 14 March 2015 at 16:10, Jamil Egdemir <address@hidden> wrote:

> I'm using c to work on some code building against allegro and using
> autotools to handle the build system.  Trouble is the code is trying
> to pull in a bitmap and I'm not sure how to handle this properly when
> using autotools. (My apologies in advance if this is more of a c
> question or I'm posting on the wrong list here.)
>

This is indeed mostly a general programming question more than one about
autotools, but anyway.

You're not fully-qualifying your image path, which means you're going to
load it from CWD (Current Work Directory), and that of course will fail if
you're not in the same directory as the bitmap file.

You can install the data file as `data_DATA = yourbitmap.bmp` and then use
`DATADIR "yourbitmap.bmp"` to load it, in which case it will only work if
you're installing the package and not if you're building and running it
locally.

Diego Elio Pettenò — Flameeyes
https://blog.flameeyes.eu/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]