LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C header file location? (https://www.linuxquestions.org/questions/programming-9/c-header-file-location-621986/)

Sambojambo 02-18-2008 07:42 AM

C header file location?
 
Hello everyone,

Usually not my area - but I'm having to tentivley dip my toe into a bit of 'C' at the moment and am still finding my way around.

Code:


#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <math.h>
#include <jasper/jasper.h>

I'm trying to compile something that needs libjasper 'The JasPer JPEG-2000 runtime library' available in the Ubuntu repos which is installed - however my system is unable to find it?

Code:


sam@nugget:~/workspace/castengine/admin/c_stuff$ gcc grib2_access.c -o grib2_access
In file included from grib2_access.c:3:
unpackgrib2.c:135:27: error: jasper/jasper.h: No such file or directory
In file included from grib2_access.c:3:



My question is: where are the C libs placed on my machine (Ubuntu Gutsy ) so that I can take a look? Is the jasper.h included in the right way? I sure there's something obvious that I'm missing.

Thanks in advance - any suggestions would be appreciated.

dmail 02-18-2008 08:08 AM

The file maybe in usr/include or usr/local/include have you added the include path for gcc
something like -I/include/jasper

edit:
"...where are the C libs..." I didn't see this libs are in usr/lib and usr/local/lib The error you are getting thought is that it can not find the header.

Sambojambo 02-18-2008 08:45 AM

Not there
 
Thanks Dmail - that makes more sense. I now know where to find the header files. It looks like the jasper.h simply wasn't there?

I've now installed the JasPer library from source and jasper.h is now in the right place.

Code:

sam@nugget:/usr/local/include$ tree
.
|-- jasper
|  |-- jas_cm.h
|  |-- jas_config.h
|  |-- jas_config2.h
|  |-- jas_debug.h
|  |-- jas_fix.h
|  |-- jas_getopt.h
|  |-- jas_icc.h
|  |-- jas_image.h
|  |-- jas_init.h
|  |-- jas_malloc.h
|  |-- jas_math.h
|  |-- jas_seq.h
|  |-- jas_stream.h
|  |-- jas_string.h
|  |-- jas_tmr.h
|  |-- jas_tvp.h
|  |-- jas_types.h
|  |-- jas_version.h
|  `-- jasper.h
|-- jconfig.h
|-- jerror.h
|-- jmorecfg.h
`-- jpeglib.h

1 directory, 23 files

Thanks for your help


All times are GMT -5. The time now is 01:27 PM.