# MacOSX Compile Problems

**URL:** <https://discourse.libsdl.org/t/macosx-compile-problems/5647>\
**Category:** SDL Development\
**Created:** [December 18, 2001, 8:18pm UTC](https://discourse.libsdl.org/t/macosx-compile-problems/5647 "2001-12-18T20:18:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Rich](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@Michael\_Rich](https://discourse.libsdl.org/u/Michael_Rich)\
**Post date:** [December 18, 2001, 8:18pm UTC](https://discourse.libsdl.org/t/macosx-compile-problems/5647/1 "2001-12-18T20:18:01Z")

</div>

(not directly SDL related, but my project does use it… sorry).

I’m all of a sudden getting some compile errors on OSX using Project Builder  
and I was wondering if anyone could shed some light on it.

It all started when I added the STL string template to one of my classes.  
I’ve read that there are issues with templates, but I’ve not found a clear  
way to fix the problem, plus I’ve never really seen these error mentioned  
with those problem.

Anyways, now when I’m compiling my project I get the following errors when  
linking.

/usr/bin/ld: Undefined symbols:  
\_assign\_\_t18string\_char\_traits1ZcRcRCc  
\_compare\_\_t18string\_char\_traits1ZcPCcn1Ul  
\_copy\_\_t18string\_char\_traits1ZcPcPCcUl  
\_eos\_\_t18string\_char\_traits1Zc  
\_eq\_\_t18string\_char\_traits1ZcRCcn1  
\_length\_\_t18string\_char\_traits1ZcPCc  
\_move\_\_t18string\_char\_traits1ZcPcPCcUl  
\_ne\_\_t18string\_char\_traits1ZcRCcn1  
\_set\_\_t18string\_char\_traits1ZcPcRCcUl

The template i’m using is the string template.

#include

creating it as …

string m\_sCaption;

Does anyone have any idea what I can do to fix this error?

Thanks,

Michael Rich  
[http://www.AlphaX86.com](http://www.AlphaX86.com)

---

<div class="post-metadata">

**Author:** ![Mark\_K\_Kim](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@Mark\_K\_Kim](https://discourse.libsdl.org/u/Mark_K_Kim)\
**Post date:** [December 18, 2001, 9:54pm UTC](https://discourse.libsdl.org/t/macosx-compile-problems/5647/2 "2001-12-18T21:54:01Z")

</div>

It looks like it’s not linking with the library. Does the Project Builder  
come with some linking options for STL libraries that need to be enabled?

-MarkOn Tue, 18 Dec 2001, Michael Rich wrote:

> (not directly SDL related, but my project does use it… sorry).
> 
> I’m all of a sudden getting some compile errors on OSX using Project Builder  
> and I was wondering if anyone could shed some light on it.
> 
> It all started when I added the STL string template to one of my classes.  
> I’ve read that there are issues with templates, but I’ve not found a clear  
> way to fix the problem, plus I’ve never really seen these error mentioned  
> with those problem.
> 
> Anyways, now when I’m compiling my project I get the following errors when  
> linking.
> 
> /usr/bin/ld: Undefined symbols:  
> \_assign\_\_t18string\_char\_traits1ZcRcRCc  
> \_compare\_\_t18string\_char\_traits1ZcPCcn1Ul  
> \_copy\_\_t18string\_char\_traits1ZcPcPCcUl  
> \_eos\_\_t18string\_char\_traits1Zc  
> \_eq\_\_t18string\_char\_traits1ZcRCcn1  
> \_length\_\_t18string\_char\_traits1ZcPCc  
> \_move\_\_t18string\_char\_traits1ZcPcPCcUl  
> \_ne\_\_t18string\_char\_traits1ZcRCcn1  
> \_set\_\_t18string\_char\_traits1ZcPcRCcUl
> 
> The template i’m using is the string template.
> 
> #include
> 
> creating it as …
> 
> string m\_sCaption;
> 
> Does anyone have any idea what I can do to fix this error?
> 
> Thanks,
> 
> Michael Rich  
> [http://www.AlphaX86.com](http://www.AlphaX86.com)
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

–  
Mark K. Kim  
[http://www.cbreak.org/mark/](http://www.cbreak.org/mark/)  
PGP key available upon request.

---

<div class="post-metadata">

**Author:** ![Michael\_Rich](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@Michael\_Rich](https://discourse.libsdl.org/u/Michael_Rich)\
**Post date:** [December 18, 2001, 11:37pm UTC](https://discourse.libsdl.org/t/macosx-compile-problems/5647/3 "2001-12-18T23:37:01Z")

</div>

> It looks like it’s not linking with the library. Does the  
> Project Builder  
> come with some linking options for STL libraries that need to  
> be enabled?

Yes I finally found it, at first I’d put a…

-lstdc++

in the compiler settings, not realizing just a half-page down was the actual  
LINKER settings, so when I moved the option down into the linkers additional  
options (On the “Build Settings” tab of the target) and hit compile, it  
compiled right up and I was able to run it.

Thanks for making me double check myself.

mike
