SDL 1.3 - MacOS X build errors

I get some compile errors on a fairly recently SDL 1.3 build I got within the last week. Here’s the first error:

/Users/vernold/SDL Sep 2010 - Won’t Compile/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoawindow.m:298:0 /Users/vernold/SDL Sep 2010 - Won’t Compile/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoawindow.m:298: error: ‘NSTouch’ undeclared (first use in this function)

The others are similar. Sounds like a simple #include that is missing. Which one?

-Vern

Which SDK are you compiling with? I think NSTouch is fairly new. If
your SDK is too old, then it won’t have the header.

Thanks,
EricOn 9/20/10, VernJensen wrote:

I get some compile errors on a fairly recently SDL 1.3 build I got within
the last week. Here’s the first error:

/Users/vernold/SDL Sep 2010 - Won’t
Compile/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoawindow.m:298:0
/Users/vernold/SDL Sep 2010 - Won’t
Compile/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoawindow.m:298: error:
‘NSTouch’ undeclared (first use in this function)

The others are similar. Sounds like a simple #include that is missing. Which
one?

-Vern


Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

I’m not sure if the OP got his to work, but just wanted to chime in that for me the issue was that the AppKit framework was not linked to in the project. (The AppKit framework contains NSTouch).

But piggy backing on this post, I can’t get my SDL 1.3 source from Mercurial to compile using XCode on 10.6.4. It produces the following link errors:

Code:
Ld build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL normal ppc
cd /Users/grady/dev/lib/SDL/Xcode/SDL
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.0 -arch ppc -dynamiclib -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/grady/dev/lib/SDL/Xcode/SDL/build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK -F/Users/grady/dev/lib/SDL/Xcode/SDL/build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK -filelist /Users/grady/dev/lib/SDL/Xcode/SDL/build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL.LinkFileList -install_name @executable_path/…/Frameworks/SDL.framework/Versions/1.3/SDL -mmacosx-version-min=10.6 -framework AudioToolbox -framework AudioUnit -framework Cocoa -framework CoreAudio -framework IOKit -framework OpenGL -framework CoreFoundation -framework Carbon -framework ForceFeedback -framework AppKit -single_module -compatibility_version 1.3 -current_version 1.3.0 -o /Users/grady/dev/lib/SDL/Xcode/SDL/build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL

Undefined symbols:
"_SDL_atan2", referenced from:
_dollarNormalize in SDL_gesture.o
_SDL_GestureProcessEvent in SDL_gesture.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

New user to SDL here, would love to get this working …

Thanks!
Mike

I believe it has something to do with the config file, like i posted some
time ago for the iphone project.
You probably need to add HAVE_ATAN2 to your platform config.h file

VittorioOn Thu, Oct 7, 2010 at 6:51 PM, gradyetc wrote:

I’m not sure if the OP got his to work, but just wanted to chime in that
for me the issue was that the AppKit framework was not linked to in the
project. (The AppKit framework contains NSTouch).

But piggy backing on this post, I can’t get my SDL 1.3 source from
Mercurial to compile using XCode on 10.6.4. It produces the following link
errors:

Code:

Ld
build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL
normal ppc
cd /Users/grady/dev/lib/SDL/Xcode/SDL
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.0 -arch ppc -dynamiclib -isysroot
/Developer/SDKs/MacOSX10.6.sdk
-L/Users/grady/dev/lib/SDL/Xcode/SDL/build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK
-F/Users/grady/dev/lib/SDL/Xcode/SDL/build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK
-filelist
/Users/grady/dev/lib/SDL/Xcode/SDL/build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL.LinkFileList
-install_name @executable_path/…/Frameworks/SDL.framework/Versions/1.3/SDL
-mmacosx-version-min=10.6 -framework AudioToolbox -framework AudioUnit
-framework Cocoa -framework CoreAudio -framework IOKit -framework OpenGL
-framework CoreFoundation -framework Carbon -framework ForceFeedback
-framework AppKit -single_module -compatibility_version 1.3 -current_version
1.3.0 -o
/Users/grady/dev/lib/SDL/Xcode/SDL/build/SDL.build/Deployment_for_official_releases_using_10.4SDK_and_10.6SDK/Framework.build/Objects-normal/ppc/SDL

Undefined symbols:
"_SDL_atan2", referenced from:
_dollarNormalize in SDL_gesture.o
_SDL_GestureProcessEvent in SDL_gesture.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

New user to SDL here, would love to get this working …

Thanks!
Mike


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org