If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

A "LINK : fatal error LNK1255" Problem.

I am using Visual Studio 2005 C++ environment to work with a Windows Form Project.
I am working on a simple mini-game using game objects (game field, monsters, etc.) detailed in some classes which are collected in a library file. This library file also uses a DirectX object to allow multiple sounds to be played at the same time.

The Project can be built successfully. When I start the game using "Start without debugging" after the building process is completed, it works everything working as planned. Same with "Start with debugging". Perfect. The following is the log.

Now I want to make a "Release" version so that my friends without VS2005 can also play the game files. The game files can also be downsized. (If I send them with all the whole project files, it would be very clumsy). I use the lower row of the 2 rows in the "Build->Batch Build". It shows "Release|Win32" in the column "Solution Config". I then click Build.

Re: A "LINK : fatal error LNK1255" Problem.

Thanks for your reply! I have visited the link "http://blogs.msdn.com/vcblog/archive/2007/05/17/diagnosing-hidden-odr-violations-in-visual-c-and-fixing-lnk2022.aspx" in the second reply of the post provided by your second link. It is informative, but I have found NO errors in both the debug and release builds of the code provided by it..... the code can run successfully....

Re: A "LINK : fatal error LNK1255" Problem.

This error message sounds like you are mixing managed and unmanaged code or/and libraries in your release build.
Try to compare debug and release options. Or, perhaps, just create a new VC++ (native!) project and compare release settings with it!

Re: A "LINK : fatal error LNK1255" Problem.

Originally Posted by VictorN

So, now it links OK. Doesn't it?

No.
I mean I use Batch Build in the game library project to build the Release build of the library file. This is OK, and then I put the Release version of the lib file into the main game project folder, replacing the old Debug version. Then I try to build the Release build of the main game project.

Re: A "LINK : fatal error LNK1255" Problem.

Originally Posted by VictorN

Sorra, I cannot help you with the porblem in *batch* build.
Why don't you want to build it from within IDE?

The problem is now solved. I check the project settings in both debug and release modes and I find some differences. I notice that the game lib project is without Pure MSLI Common Language Runtime support. I turn it on and rebuild the game lib and use it to rebuild the main game project, which is intriguingly with Pure MSLI in release mode. The building is OK! I get simple files in release mode and they work!

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.