Advertisement

"Undefinded Reference" x 50 :: Please help...

Started by July 22, 2001 08:35 PM
0 comments, last by IOStream 23 years, 6 months ago
I''m reading Tricks of the Windows Game Programming Gurus and I just finished chapter 8 and was doing a practice demo on the BOB Engine. I included this library called T3DLIB1.H which has a hundreds of function definitions for the engine. Well I included it in my code to (#include "T3DLIB1.H") get the function calls. But when I compile, I get over 50 "Undefined Reference" which leads to just about all my functions... I included it in my code so what the heck is wrong? I even added the code FROM the header file and put it in my .cpp file instead, and I still get 50+ "undefined reference..." errors in my linker file. If you know what I''m talking about please post the answer here <-
Well I don''t think you included any library. What you included is probably a header file that contains prototypes of functions which are in a library. You need to add the actual library, which will have a .lib extension, not a .h extension, to your project.

How you do that depends on your linker. Check the documentation.

An undefined reference occurs when you have a prototype for a function and try to use that function with no code available for the function.

Seeya
Krippy

This topic is closed to new replies.

Advertisement