Discussion:
Linking error with SDL 1.2 on MacOS X 10.4.11
(too old to reply)
Nik
2017-03-09 06:30:45 UTC
Permalink
Nik
2017-03-12 12:09:16 UTC
Permalink
Hello,

okey forum works again....

I want to port my Linux SDL 1.2 programs to Mac OS X. I have got a Mac Mini Intel Core Solo with Mac OS X 10.4.11, XCode 2.5 .

I have installed SDL-1.2.15-OSX10.4.dmg (Intel/PPC 10.4). When compiling and linking with the following makefile:

test:

gcc -I/Library/Frameworks/SDL.framework/Headers -c test.c SDLmain.m


gcc -L/Library/Frameworks/SDL.framework/ -o test test.o SDLmain.o -framework SDL -framework Cocoa

Compiling works fine but I am getting the following linker error:

/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_CGDisplayCopyAllDisplayModes referenced from SDL expected to be defined in ApplicationServices
_CGDisplayCopyDisplayMode referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeCopyPixelEncoding referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetHeight referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetWidth referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRelease referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRetain referenced from SDL expected to be defined in ApplicationServices
_CGDisplaySetDisplayMode referenced from SDL expected to be defined in ApplicationServices
collect2: ld returned 1 exit status
make: *** [test] Error 1

Using

gcc -L/Library/Frameworks/SDL.framework/ -L/System/Library/Frameworks/ApplicationServices.framework/ -o test test.o SDLmain.o -framework ApplicationServices -framework SDL -framework Cocoa

doesn't work either.

Can somebody help?


Regards

Nik
Ryan C. Gordon
2017-03-13 00:14:24 UTC
Permalink
Try:

-framework CoreGraphics

--ryan.
Post by Nik
Hello,
okey forum works again....
I want to port my Linux SDL 1.2 programs to Mac OS X. I have got a Mac Mini Intel Core Solo with Mac OS X 10.4.11, XCode 2.5 .
gcc -I/Library/Frameworks/SDL.framework/Headers -c test.c SDLmain.m
gcc -L/Library/Frameworks/SDL.framework/ -o test test.o SDLmain.o -framework SDL -framework Cocoa
_CGDisplayCopyAllDisplayModes referenced from SDL expected to be defined in ApplicationServices
_CGDisplayCopyDisplayMode referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeCopyPixelEncoding referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetHeight referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetWidth referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRelease referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRetain referenced from SDL expected to be defined in ApplicationServices
_CGDisplaySetDisplayMode referenced from SDL expected to be defined in ApplicationServices
collect2: ld returned 1 exit status
make: *** [test] Error 1
Using
gcc -L/Library/Frameworks/SDL.framework/ -L/System/Library/Frameworks/ApplicationServices.framework/ -o test test.o SDLmain.o -framework ApplicationServices -framework SDL -framework Cocoa
doesn't work either.
Can somebody help?
Regards
Nik
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Continue reading on narkive:
Loading...