-21

Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?

I have troubles with compiling this code http://pastebin.com/a7AMbYPv.

Here are the errors I get:

C:\Dev-Cpp\include\main.cpp In function 'int write_jpeg_file(char*)': 
109 25 C:\Dev-Cpp\include\main.cpp [Error] invalid conversion from 'int' to 'J_COLOR_SPACE' [-fpermissive] 
C:\Dev-Cpp\include\main.cpp In function 'int main()': 
130 21 C:\Dev-Cpp\include\main.cpp [Warning] deprecated conversion from string constant to 'char*' [-Wwrite-strings] 
130 48 C:\Dev-Cpp\include\main.cpp [Warning] deprecated conversion from string constant to 'char*' [-Wwrite-strings] 
C:\Users\NIVER\Desktop\Makefile.win [Error] [../../../Dev-Cpp/include/main.o] Error 1 (if this is the only error: please check your library includes) 

Any help would be appreciated.

Community
  • 1
  • 1
NiVeR
  • 9,644
  • 4
  • 30
  • 35

1 Answers1

2

In your code you have reference to functions that you do not implement them (jpeg_std_error, ...), so you must provide their implementation to the linker. this is usually done with adding a .lib or .a or something like that to list of inputs of your linker. please look where you get the sample and get its implementation of those functions (either a source C/C++) files or get its compiled library (in form .lib or .a) and add them to the linker with flags that specified for your linker and every thing will work as expected

BigBoss
  • 6,904
  • 2
  • 23
  • 38