Skip to main content
GameDev.net gamedev.net
🔒 Locked

linking error

Started by rajesh msen Mar 30, 2009 at 2:02 AM 9 replies 2k views
Original Post
rajesh msen
rajesh msen
Hello to all I am using Visual Studio 2008 Express edition. When I compiling in debug mode i got this following error "fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'" Same code compiling in release mode i got this following error Code: 1>Linking... 1>fatal error C1047: The object or library file '.\obj\Release\main.obj' was created with an older compiler than other objects; rebuild old objects and libraries 1>LINK : fatal error LNK1257: code generation failed some one please help me fix this Thanks in advance --Rajesh--
Codeka
Codeka
The error messages seem to explain the problem pretty well to me (especially the release mode one). What have you tried to do to fix the problem?
rajesh msen
rajesh msen
I don't know how to fix this till now
phresnel
phresnel
Do what the error message suggests, and rebuild main.obj. The sourcecode file is probably main.cpp.

Or better, get a introductory book about C or C++, preferably one that has a chapter about the different phases of source-to-program translation (compilation, linking) and a chapter on how to build libraries.
rajesh msen
rajesh msen
Thanks for reply
I am using Visual Studio 2008 Express i don't know any book existing for latest version MSVC plus plus.If you any book please suggest me.Thanks in advance

--Rajesh--
midasmax
midasmax
In your VC++ 2008 Express program, in the top bar Click on Build->Rebuild Solution.
phresnel
phresnel
Quote:
Original post by rajesh msen
Thanks for reply
I am using Visual Studio 2008 Express i don't know any book existing for latest version MSVC plus plus.If you any book please suggest me.Thanks in advance

--Rajesh--


No, I was suggesting to get a book about the Programming Language C++, not about an IDE, because you seem to lack some fundamental knowledge about programming in C++.
daviangel
daviangel
Quote:
Original post by phresnel
Quote:
Original post by rajesh msen
Thanks for reply
I am using Visual Studio 2008 Express i don't know any book existing for latest version MSVC plus plus.If you any book please suggest me.Thanks in advance

--Rajesh--


No, I was suggesting to get a book about the Programming Language C++, not about an IDE, because you seem to lack some fundamental knowledge about programming in C++.

Actually, Ivor Horton has a book out that does a decent job of covering VS2008 but in response to the original post maybe if you included a bit more context on what you are trying to accomplish maybe you will get the response you are expecting.

[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
phresnel
phresnel
Quote:
Original post by daviangel
Quote:
Original post by phresnel
Quote:
Original post by rajesh msen
Thanks for reply
I am using Visual Studio 2008 Express i don't know any book existing for latest version MSVC plus plus.If you any book please suggest me.Thanks in advance

--Rajesh--


No, I was suggesting to get a book about the Programming Language C++, not about an IDE, because you seem to lack some fundamental knowledge about programming in C++.

Actually, Ivor Horton has a book out that does a decent job of covering VS2008 but in response to the original post maybe if you included a bit more context on what you are trying to accomplish maybe you will get the response you are expecting.

I fail to find how Ivor Horton covers C1047.

The last version of MSVC I used back in the day was 6.0 (I think that was in '99-'00), but still, with my (humble) general C++ knowledge, I am able to solve the problem by seeing that main.obj, an object file (a file you get after compiling a unit of source code; finally, you pass several object-files to the linker, who assembles an executable binary), requires rebuilding, especially when I see "rebuild old objects and libraries". Now, I can lookup my compiler- or IDE-handbook, and rebuild.

My advice is always to learn a programming language's fundamentals first (Chapter 1: "Hello World", ..., Chapter 3: "Splitting the sourcecode into multiple units", Chapter 3.1: "Phases of translation" ), then an IDE in depth; and I wish someone would have given me the same advice when I was programming-young.

I don't mean to edit your source code in notepad or [insert one of the rare non syntax highlighting editors for unix; unfortunately, I don't know one myself] or etc., but I mean to understand the most fundamental translation steps in C++ programming on a very basic level; this would enable you as the programmer to get the solution to the OP problem for every C++ compiler that has only a half as decent error message as this. The fact that the OP seems not to be able to find a solution to this simple problem seems to affirm this. Always remember that using an IDE is not necessarily programming. Programming is mostly what you can do in any IDE.

rajesh msen
rajesh msen
Thanks for all the above guy's


Hi Phresnel
i want to know which books covers the topics you mentioned.I know programming(beginning) but i don't know the things like(a file get after compiling a unit of source code,passing several object-files to the linker,assembles an executable binary) can you guide where to find these tutorials or book

Thanks in advance



---Rajesh---
phresnel
phresnel
Quote:
Original post by rajesh msen
Thanks for all the above guy's


Hi Phresnel
i want to know which books covers the topics you mentioned.I know programming(beginning) but i don't know the things like(a file get after compiling a unit of source code,passing several object-files to the linker,assembles an executable binary) can you guide where to find these tutorials or book

Thanks in advance



---Rajesh---


Unfortunately, I haven't read any introductory book (this is why I said I wish someone had advised me to read one of those books, when I began programming), but I hear good about Scott Meyers, Herb Sutters or Nico Josuttis books; but better use gamedev.net's search function for "beginner c++ books" ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.