Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 1 link problem with gltReadTGABits() under OSX 10.6, XCode 4.0 #36

Open
GoogleCodeExporter opened this issue Apr 20, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Set up a project according to the instructions in Chapter 2, but using the 
block.cpp sourcecode from chapter 1.
2. Included libGLTools.a from the XCode.zip download into the project.

What is the expected output? What do you see instead?

The linker error that I'm getting is the typical undefined symbol: 
"gltReadTGABits(char const*, int*, int*, int*, unsigned int*). It doesn't seem 
to matter whether I compile 32-bit or 64-bit.

BTW, the Triangle example works fine, so I don't think the problem is my setup.

What version of the product are you using? On what operating system?
OSX 10.6, XCode 4.0

Please provide any additional information below.

I'm a little new to Mac programming as well as OpenGL -- but I see other 
newbies with the same problem on other discussion boards.  They've largely 
solved it by copying the source of the function directly into their source 
file.  I'd rather figure out what the cause is and fix that.

Original issue reported on code.google.com by [email protected] on 31 Aug 2011 at 10:06

@GoogleCodeExporter
Copy link
Author

I have the same problem. Looking at the link error, it seems like the compiler 
is looking for a c++ mangled name. Is it possible the library version is a pure 
C function?

One way to fix the problem is to simply copy the code from the book as part of 
the example and replace the function call with that one.

Original comment by [email protected] on 24 Nov 2011 at 5:19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant