PDA

View Full Version : LNK1123: failure during conversion to COFF



Dancer
05-18-2014, 02:39 PM
I need help trying to fix the following error message:

1>------ Build started: Project: Starting_square, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am have a Win 7, 64-bit Win computer and followed the Guide to Installing OpenGL for Windows, through the download section of at www.sumantaguha.com. I installed Visual C++ 2010 Express, glew, freeglut and glext.h files in the suggested places. I then used the Property Pages of Visual C++ to indicate where to find the added include and library files. I tried running the following sample code, for which I will only show the first few lines. Thanks for helping me to get started.

///////////////////////////////////
// square.cpp
//
// OpenGL program to draw a square.
//
// Sumanta Guha.
///////////////////////////////////

#ifdef __APPLE__
# include <GL/glew.h>
# include <GL/freeglut.h>
# include <OpenGL/glext.h>
#else
# include <GL/glew.h>
# include <GL/freeglut.h>
# include <GL/glext.h>
#pragma comment(lib, "glew32.lib")
#endif

// Drawing routine.
void drawScene(void)

Dancer
05-19-2014, 01:25 PM
I was able to solve the "LNK1123: failure during conversion to COFF" by installing
Visual C++ 2010 service pack 1


Hopefully this may be of help to other beginners.