Hi all, I’m getting an error with very simple code:
extern “C”
{
#include <stdio.h>
#include <jpeglib.h>
}
int main()
{
jpeg_create_compress(NULL);
return 0;
}
The error is:
-------------- Build: Debug in clang_test ---------------
Linking console executable: bin\Debug\clang_test.exe
obj\Debug\main.o: In function main': C:\chhenning\code_blocks\clang_test/main.cpp:17: undefined reference to
jpeg_CreateCompress’
collect2: ld returned 1 exit status
clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I’m using codeblocks on Windows with clang 3.2.
Anyone know how to fix this?
Thanks,
Christian