Jump to content
  • Advertisement

Archived

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

Zoot

Linux...

This topic is 5854 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
Advertisement
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" {
#endif

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

IMAGE *ImageLoad(char *);

#ifdef __cplusplus
}
#endif

#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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!