Re: [ILUG] Linker problems

From: Carlos O'Donell (carlos at domain baldric.uwo.ca)
Date: Wed 18 Sep 2002 - 19:03:03 IST


> Carlos,
>
> Assuming the linker is finding the library ok is the jpeg api in C ?
> By default c++ compilers and g++ do name mangling when resolving the
> references to link with the functions in a library, so if you put :-
> #ifdef __cplusplus /* stop g++ mangling C Api function names */
> extern "C" int jpeg_xxxxx()
> extern "C" int jpeg_yyyyy()
> ...
> ...
> #endif
> around the function prototypes for the jpeg API it may resolve the
> problem, if you got a .h file with the jpeg prototypes in there it
> should include that but you can put it in there manually.
>
> C.
>

/usr/include/jpeglib.h:

16 #ifdef __cplusplus
17 extern "C" {
18 #endif
...
1100 #ifdef __cplusplus
1101 }
1102 #endif

Utopian...

Which headers are you using?

c.



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:56 GMT