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