Linking error with SDL 1.2 on MacOS X 10.4.11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Nik
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Linking error with SDL 1.2 on MacOS X 10.4.11

Nik

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Nik
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linking error with SDL 1.2 on MacOS X 10.4.11

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 .

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

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linking error with SDL 1.2 on MacOS X 10.4.11

Ryan C. Gordon

Try:

-framework CoreGraphics

--ryan.


> On Mar 12, 2017, at 8:09 AM, Nik <[hidden email]> wrote:
>
> 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
> _______________________________________________
> SDL mailing list
> [hidden email]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Loading...