Re: OS X linkage problems

Brent Burton <[email protected]> Mon, 9 Mar 2009 17:42:54 -0500
Newsgroups gmane.games.torcs.devel
Message-ID <[email protected]>
Found it. This may be a help to anyone else who is trying to build
portable software.

The issue is caused by the platform SDK one compiles against. The PLIB
framework was built against the Leopard 10.5 SDK, and I was attempting
to build everything against the 10.4 SDK.

Sure enough, OpenGL/gl.h in 10.5 defines GLenum as "unsigned int", and
the old 10.4 gl.h has "unsigned long". Unsigned int is the safer of
the two going forward into 64bit apps, which is probably why it
changed.

Once I set everything to build against 10.5 SDK, the errors went away.
I could have also rebuilt plib with 10.4.

Libraries that do not link against anything beyond standard C/C++
libraries will not have this problem, but whenever any SDK framework
is used (CoreImage, OpenAL, OpenGL, etc), the SDK choice is important.

-Brent

On Sun, Mar 8, 2009 at 9:36 PM, Brent Burton <[email protected]> wrote:
> Some observations on the linkage issue with plib.
>
> The issue occurs with the ssggraph module, and the grVtxTable subclass
> of plib's ssgVtxTable. One of the ssgVtxTable constructors is:
> ssgVtxTable(GLenum type, ssgVertexArray* va, ssgNormalArray* na,
> ssgTexCoordArray* ta, ssgColourArray* ca)
> ...
> [unsigned int vs unsigned long in link search]

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H