Linker error Code generation failed in vc++ win32 application

I have developed a glut and glui APPLICATION IN  vc++ win32 console application under windows vista......

My application was working fine.....I had used glpng library in my application to display png files...Later I replaced glpng with SOIL( simple open Image Library).. and also changed code according to that....suddenly my application is showing  the following linker error

LNK 1147 code generation failed......
any help would be greatly appreciated.......I tried to solve it from the morning......I could not solve it....
jsbsudhaAsked:
Who is Participating?
 
itsmeandnobodyelseConnect With a Mentor Commented:
>>>> Linker Tools Error LNK1257 code generation failed

Actually that is only the final message after some other error(s) that were shown above in the output window.

>>>> Linker Tools Error LNK1147  invalid number specified with option 'option'

That is an error which comes if you were compiling newer sample code, e. g. for VC9 coming with VS2008 with an elder compiler (e. g. VC7.1 compiler coming with VS 2003). Then, one of the compiler options could not properly be handled as it was an option only supported by the newer compiler.

Please post all error messages of the output window, not only the final messages which actually doesn't say more than that compiling failed.


0
 
jkrCommented:
Be sure to add "soil.lib" to your project to resolve th elinker errors. Either add a

#pragma comment(lib,"soil.lib")

to your code or add the lib via  "Project|Add exiting Item".
0
 
jsbsudhaAuthor Commented:
I have added the library still i get the  same error
linker error--- code generation failed
fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411'
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jkrCommented:
What are 'P1' and 'P2' in the above?
0
 
jsbsudhaAuthor Commented:
I have to update anything in windows vista to solve this problem......It is not building the application......I have removed the glpng and glpngd library from additional dependencies...and added soil.lib.......
0
 
jsbsudhaAuthor Commented:
I serached in msdn it is pass1 and pass2......I got this message in the ouput message window......surely it is not any variable
0
 
jsbsudhaAuthor Commented:
It was working fine with glpng libraray .......but now it is not building
0
 
jkrCommented:
Do you have more than one version of Visual Studio installed?
0
 
jsbsudhaAuthor Commented:
NO...
0
 
jsbsudhaAuthor Commented:
LNK 1257 and not lnk 1147
0
 
jsbsudhaAuthor Commented:
I have solved the error in windows XP.....by having the correct version of  SOIL.lib in my program........I downloaded SOIL.lib from its website but I replaced it with another version of SOIL.lib library without my knowledge.......

THank you very much my error is solved...................
0
All Courses

From novice to tech pro — start learning today.