Weird compile error

Hi

I´m just starting out with both C++ and OpenGL, so go easy on any hardcore technical answers =). Often, when I compile small tutorial examples I get a strange error when linking:

C:\DevStudio\VC\LIB\glut32.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x392502b3

I know my harddrive isn´t full and the glut32.lib is not corrupted. I´ve tried with several different downloads of it.

Help would be really appreciated!

Sincerley
Mats
Sweden

Sounds familiar: http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/000913.html

You might also check the GLUT 3.7 distribution from here http://reality.sgi.com/opengl/glut3/#windows

[This message has been edited by Relic (edited 08-10-2000).]

Inside Visual C++ go to projects->settings.

Then go to the Link tab.

In the Objects/library modules field add glut32.lib

you might also need
glu32.lib
opengl32.lib
and possibly glaux.lib

Hi again.

Thank you, that problem seems to be solved, but now I get a new one…

Linking…
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/underwater.exe : fatal error LNK1120: 1 unresolved externals

…and I´m back in limbo again.

Help!

Sincerely
Mats

The last error is most likley to occur when you choose wrong type of project when you first create your project. If you want to use GLUT (which is a console-based API), you should create a “Win32 Conssole Application”. This will create a project that uses main() as startingpoint. If you instead want to create a “standard” Windows program, you should create a “Win32 Application”, and use WinMain() as startingpoint. This is probably what you have done, created a “Win32 Application” with main() as startingpoint.

All this can be found under the Project-tab in File->New in MSVC 6. You can do it other ways aswell, but then you might have to mess with linkerswitches, which you probably don’t want to.

[This message has been edited by Bob (edited 08-10-2000).]

Thanks!

It compiles and links without errors!

I couldn´t view the program because my gfx-card doesn´t have multitexture support, but hey… you can´t get everything. =)

Thanks again. Hope I can return the favour one day.

Sincerely
Mats