PDA

View Full Version : Weird compile error



Mats
08-10-2000, 05:41 AM
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

Relic
08-10-2000, 06:13 AM
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).]

ribblem
08-10-2000, 07:56 AM
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

Mats
08-10-2000, 11:03 AM
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

Bob
08-10-2000, 12:15 PM
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).]

Mats
08-10-2000, 04:09 PM
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