Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 5940 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I installed linux last week... I have got open working but not with Lesson 26.. What is wrong? I get this when i am trying to compile it.. zoot@debian400:~/opengl/lesson26$ make cc -c Lesson26.cpp cc -c image.c cc -o Lesson26 -L/usr/X11R6/lib -lGL -lGLU -lglut image.o Lesson26.o Lesson26.o: In function `LoadGLTextures(void)'': Lesson26.o(.text+0xaa): undefined reference to `ImageLoad(char *)'' Lesson26.o(.text+0xc9): undefined reference to `ImageLoad(char *)'' Lesson26.o(.text+0xe8): undefined reference to `ImageLoad(char *)'' collect2: ld returned 1 exit status make: *** [all] Error 1 zoot@debian400:~/opengl/lesson26$

Share this post

Link to post
Share on other sites
The problem is poorly written code. Change image.h to this (all I did was add the C++ check, as you can see):

#ifndef __IMAGE_H__
#define __IMAGE_H__

#ifdef __cplusplus
extern "C" {

typedef struct
unsigned short imagic;
unsigned short type;
unsigned short dim;
unsigned short sizeX, sizeY, sizeZ;
char name[128];
unsigned char *data;

IMAGE *ImageLoad(char *);

#ifdef __cplusplus

#endif /* !__IMAGE_H__! */

After that make sure you do a clean rebuild (make clean all).

[edited by - Null and Void on September 14, 2002 5:13:15 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!