[SDL] SDL doesn't like C++...

Spencer Salazar ssalazar at CS.Princeton.EDU
Sun Sep 10 19:23:38 PDT 2006

I do recall a while back that my OS X C++ makefile-based project was  
getting weird c++ related errors.  When I changed the linker  
invocation from gcc to g++, it was fine again--had something to do  
with the C++ runtime being linked in.

I havent discovered any way to specifically do the same thing in  
Xcode, but maybe you could try creating a new C++ tool project, and  
then manually adding SDL_main.m and SDL.framework.  Since its a C++  
project to begin with, Xcode will theoretically be smart enough to  
invoke gcc such that it includes C++ runtime support.


On Sep 10, 2006, at 4:30 PM, Mark Bishop wrote:

> I'm currently setting up a 'new' machine (Dual 450Mhz G4, 1GB RAM,  
> Mac OS X 10.3.9), and I've run into a problem after installing the  
> development tools (Xcode 1.1) and SDL: whenever I try to compile a C 
> ++ project using SDL (even the SDL template-projects), I receive  
> the following error:
>> ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(eh_exception.o) illegal  
>> reference to symbol: operator delete(void*) defined in indirectly  
>> referenced dynamic library /usr/lib/libstdc++.6.dylib
> These are the steps I've taken from a clean (but fully updated)  
> install of Mac OS X10.3.9 to try to install the development tools  
> and SDL:
> 	1 	Installed Xcode 1.1 (Easy Install)
> 	2 	Copied SDL.framework 1.2.9 to /Library/Frameworks/
> 	3 	Installed the SDL 1.2.8 development project-templates et al via  
> the .pkg installer.
> 	4 	Compiled a C++ Tool template-project, no problem.
> 	5 	Compiled an C SDL Application template-project project, no  
> problem.
> 	6 	Created a fresh C SDL Application template-project, renamed  
> main.c to main.cpp, tried to compile, no joy...
> Any help would be appreciated!
> Thanks,
> 		Mark Bishop_______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

More information about the SDL mailing list