thorfdbg / libjpeg

A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
327 stars 81 forks source link

undefined reference to "some function" #23

Closed AmmarAlbakri closed 4 years ago

AmmarAlbakri commented 4 years ago

I have been trying to compile the library but with no luck. First there was an issue with the headers that i managed to fix -i think- then after that this error popped out:

/tmp/ccygeadE.o: In function main': main.cpp:(.text+0x1bdb): undefined reference toSplitQualityC(int, bool, int&, int&)' main.cpp:(.text+0x1c0a): undefined reference to SplitQualityC(int, bool, int&, int&)' main.cpp:(.text+0x1cc8): undefined reference toReconstruct(char const, char const, int, char const, bool)' main.cpp:(.text+0x212b): undefined reference to `EncodeC(char const, char const, char const, char const, int, int, int, int, int, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, unsigned char, bool, bool, unsigned short, double, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, int, int, int, bool, bool, bool, int, bool, char const, char const, char const, int, int, int, int, bool, int, int, int, int, int, int, int, bool, bool, bool, bool, bool, bool)' collect2: error: ld returned 1 exit status

however i try to fix it i just mess it up even more.

any help to compile this library is appreciated.

thorfdbg commented 4 years ago

Compiled with which compiler on which system, please? Generally, a "./configure" followed by a "make" works perfectly here. The previous release had problems with VisualStudio as some files were missing there, but this has been fixed.