Jump to content
  • Advertisement
Sign in to follow this  
AdamTheNewbie

OpenGL Problems with camera movement and 3ds file

This topic is 5124 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 am new to OpenGL. I am trying to combine these two tutorials from www.gametutorials.com. Here are the two tutorials 1) www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm#FileLoading 2) www.gametutorials.com/Tutorials/opengl/OpenGL_Pg1.htm#Camera This one I used Camera Part3 So basically what I want to do is be able to Move around the 3ds File. Here is a link to what I have so far. http://www.trackie.ca/mattstuff/code.tar.gz When I run it I get this error g++ -c Main.cpp `sdl-config --cflags` g++ -c Init.cpp `sdl-config --cflags` g++ -c Camera.cpp `sdl-config --cflags` g++ -o unballistic Main.o Init.o Camera.o `sdl-config --libs` -lGL -lGLU -lm Main.o(.text+0x2e): In function `Init()': : undefined reference to `CLoad3DS::Import3DS(t3DModel*, char*)' Main.o(.text+0x8bc): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `CLoad3DS::CLoad3DS[in-charge]()' collect2: ld returned 1 exit status make: *** [unballistic] Error 1

Share this post


Link to post
Share on other sites
Advertisement
Any help with this? I still cant figure out the error...

I really am having a hard time with this. This is probably a really stupid question but is the MAKE file something you code or does it get made when you hit make.

Like I am using the make file that came with the camera tutorial. Should I change some code in that file??

Share this post


Link to post
Share on other sites
g++ -c Main.cpp `sdl-config --cflags`
g++ -c Init.cpp `sdl-config --cflags`
g++ -c Camera.cpp `sdl-config --cflags`
g++ -o unballistic Main.o Init.o Camera.o `sdl-config --libs` -lGL -lGLU -lm
Main.o(.text+0x2e): In function `Init()':
: undefined reference to `CLoad3DS::Import3DS(t3DModel*, char*)'

are u compiling and linking the file that contains CLoad3DS::Import3DS?

Share this post


Link to post
Share on other sites
Hey, thanks for the reply. I dont think I am compiling it. Here is a list of the files in my project

main.h
3ds.h
Camera.h
3ds.cpp
Camera.cpp
Init.cpp
Main.cpp

The file that has the code for CLoad3DS() and Import3DS() functions is in the 3ds.cpp

So I am assuming my make file is wrong... I dont really understand the make file... I tried adding code to the make file but end up getting way more errors...

Anyway here is my make file. I think I have to add something with 3ds.cpp 3ds.h in it?

CC = g++

TARGET = unballistic

$(TARGET): Main.o Init.o Camera.o
$(CC) -o $(TARGET) Main.o Init.o Camera.o `sdl-config --libs` -lGL -lGLU -lm

Main.o: Main.cpp Main.h
$(CC) -c Main.cpp `sdl-config --cflags`

Init.o: Init.cpp Main.h
$(CC) -c Init.cpp `sdl-config --cflags`

Camera.o: Camera.cpp Main.h
${CC} -c Camera.cpp `sdl-config --cflags`

clean:
rm -f $(TARGET) Main.o Init.o core Camera.o

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!