Re: The place of data files...



José Alburquerque wrote:
> On Thu, 2009-07-23 at 18:14 +0200, Sever P A wrote: 
>> Hi,
>>
>> Actually, I'm packing all my GTKmm project files of a programm that
>> manages png data files using the autotools and the question is that I
>> don't reach to understand the tutorial (placed there:
>> http://bec-systems.com/web/content/view/95/9/) when explains "How does
>> my program know where $(datadir) is located". Why there is no C/C++
>> code (while every system can put data files in a different place....)
>> ?
> 
> No C/C++ code is needed because AM_CFLAGS is used to tell the compiler
> to define the DATADIR preprocessor constant to the value of $(datadir)
> via the -D option (man gcc for more info).  The constant may be used in
> the source as any constant defined with the '#define' directive would be
> used.  For example:
> 
> printf("The data directory is %s\n", DATADIR);
> 
> I think that for C++, AM_CPPFLAGS does the same as AM_CFLAGS does for C.
> 

that should be CXXFLAGS, not CPPFLAGS (CPP here stands for "C Pre-Processor", I believe)

-- 
jonner


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