The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Link error on MacOSX
Mako_energy


Joined: 10 Feb 2011
Posts: 46
I am currently trying to do all the necessary touchups to my engine so I can get a working MacOSX port up and running. I have SDL being built through CMake which is integrated into the CMake configuration of my engine. SDL compiles just fine as a dependency, however when it attempts to link it errors in "SDL_Log.c" saying it can't find the symbol "_SDL_NSLog". I have looked through the code and I found the method it's talking about in "SDL_cocoavideo.m". As far as I can tell the project seems to be configured correctly for that files inclusion in the project.

What could be going wrong?
Link error on MacOSX
Gabriele Greco
Guest

Quote:
I am currently trying to do all the necessary touchups to my engine so I can get a working MacOSX port up and running. I have SDL being built through CMake which is integrated into the CMake configuration of my engine. SDL compiles just fine as a dependency, however when it attempts to link it errors in "SDL_Log.c" saying it can't find the symbol "_SDL_NSLog". I have looked through the code and I found the method it's talking about in "SDL_cocoavideo.m". As far as I can tell the project seems to be configured correctly for that files inclusion in the project.




I'm quite sure I've had that problem too when trying to build with CMake on OSX, so after a few failed attempts to fix the CMakeLists.txt I switched back to build with autotools, the problem I had was that some of the .m files do not get complied also if they are correctly added in the respective directories...  I thought it was some problem with my version of cmake and gave up since I had not a lot of time at the moment :)



--
Bye, Gabry
Link error on MacOSX
Doug
Guest

-- Options:
--   3DNOW                  (Wanted: ON): OFF
--   ALSA                   (Wanted: OFF): OFF
--   ALSA_SHARED            (Wanted: OFF): OFF
--   ALTIVEC                (Wanted: ON): OFF
--   ARTS                   (Wanted: OFF): OFF
--   ARTS_SHARED            (Wanted: OFF): OFF
--   ASSEMBLY               (Wanted: ON): ON
--   ASSERTIONS             (Wanted: auto): auto
--   CLOCK_GETTIME          (Wanted: OFF): OFF
--   DIRECTFB_SHARED        (Wanted: OFF): OFF
--   DIRECTX                (Wanted: OFF): OFF
--   DISKAUDIO              (Wanted: ON): ON
--   DUMMYAUDIO             (Wanted: ON): ON
--   ESD                    (Wanted: OFF): OFF
--   ESD_SHARED             (Wanted: OFF): OFF
--   FUSIONSOUND            (Wanted: OFF): OFF
--   FUSIONSOUND_SHARED     (Wanted: OFF): OFF
--   GCC_ATOMICS            (Wanted: OFF): OFF
--   INPUT_TSLIB            (Wanted: OFF): OFF
--   LIBC                   (Wanted: ON): ON
--   MMX                    (Wanted: ON): ON
--   NAS                    (Wanted: OFF): OFF
--   OSS                    (Wanted: OFF): OFF
--   PTHREADS               (Wanted: OFF): OFF
--   PTHREADS_SEM           (Wanted: OFF): OFF
--   PULSEAUDIO             (Wanted: OFF): OFF
--   PULSEAUDIO_SHARED      (Wanted: OFF): OFF
--   RENDER_D3D             (Wanted: OFF): OFF
--   RPATH                  (Wanted: OFF): OFF
--   SDL_DLOPEN             (Wanted: ON): ON
--   SSE                    (Wanted: ON): ON
--   SSE2                   (Wanted: ON): ON
--   SSEMATH                (Wanted: ON): ON
--   VIDEO_COCOA            (Wanted: ON): ON
--   VIDEO_DIRECTFB         (Wanted: OFF): OFF
--   VIDEO_DUMMY            (Wanted: ON): ON
--   VIDEO_OPENGL           (Wanted: ON): ON
--   VIDEO_OPENGLES         (Wanted: ON): OFF
--   VIDEO_X11              (Wanted: OFF): OFF
--   VIDEO_X11_XCURSOR      (Wanted: OFF): OFF
--   VIDEO_X11_XINERAMA     (Wanted: OFF): OFF
--   VIDEO_X11_XINPUT       (Wanted: OFF): OFF
--   VIDEO_X11_XRANDR       (Wanted: OFF): OFF
--   VIDEO_X11_XSCRNSAVER   (Wanted: OFF): OFF
--   VIDEO_X11_XSHAPE       (Wanted: OFF): OFF
--   VIDEO_X11_XVM          (Wanted: OFF): OFF
--   X11_SHARED             (Wanted: OFF): OFF
--
--  CFLAGS:        -g -O3
--  EXTRA_CFLAGS:  -msse2 -msse -mmmx
--  EXTRA_LDFLAGS:
--  EXTRA_LIBS:    m;iconv;/System/Library/Frameworks/Cocoa.framework;/System/Library/Frameworks/IOKit.framework;/System/Library/Frameworks/ForceFeedback.framework;/System/Library/Frameworks/Carbon.framework;/System/Library/Frameworks/CoreAudio.framework;/System/Library/Frameworks/AudioUnit.framework
--
--  Build Shared Library: ON
--  Build Static Library: ON
--
-- Something was not detected, although your are sure that it
-- has been properly installed? Then make sure, you have set
-- the CFLAGS and LDFLAGS environment variables correctly.

dougs-Mac-mini:build doug$ ninja
...
[231/231] Linking C static library libSDL2.a
dougs-Mac-mini:build doug$ ls
CMakeCache.txt      Makefile            build.ninja         include             libSDL2.2.0.0.dylib libSDL2.dylib       rules.ninja         sdl2.pc
CMakeFiles          SDL2.spec           cmake_install.cmake libSDL2.0.dylib     libSDL2.a           libSDL2main.a       sdl2-config


~

Doug.



On Fri, May 24, 2013 at 11:39 PM, Gabriele Greco wrote:
Quote:

Quote:
I am currently trying to do all the necessary touchups to my engine so I can get a working MacOSX port up and running. I have SDL being built through CMake which is integrated into the CMake configuration of my engine. SDL compiles just fine as a dependency, however when it attempts to link it errors in "SDL_Log.c" saying it can't find the symbol "_SDL_NSLog". I have looked through the code and I found the method it's talking about in "SDL_cocoavideo.m". As far as I can tell the project seems to be configured correctly for that files inclusion in the project.





I'm quite sure I've had that problem too when trying to build with CMake on OSX, so after a few failed attempts to fix the CMakeLists.txt I switched back to build with autotools, the problem I had was that some of the .m files do not get complied also if they are correctly added in the respective directories...  I thought it was some problem with my version of cmake and gave up since I had not a lot of time at the moment :)



--
Bye, Gabry

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Link error on MacOSX
Doug
Guest

(that's off hg head; can't comment on if it builds on any other snap shots or whatever)

~

Doug.





On Sat, May 25, 2013 at 7:56 PM, Doug wrote:
Quote:
-- Options:
--   3DNOW                  (Wanted: ON): OFF
--   ALSA                   (Wanted: OFF): OFF
--   ALSA_SHARED            (Wanted: OFF): OFF
--   ALTIVEC                (Wanted: ON): OFF
--   ARTS                   (Wanted: OFF): OFF
--   ARTS_SHARED            (Wanted: OFF): OFF
--   ASSEMBLY               (Wanted: ON): ON
--   ASSERTIONS             (Wanted: auto): auto
--   CLOCK_GETTIME          (Wanted: OFF): OFF
--   DIRECTFB_SHARED        (Wanted: OFF): OFF
--   DIRECTX                (Wanted: OFF): OFF
--   DISKAUDIO              (Wanted: ON): ON
--   DUMMYAUDIO             (Wanted: ON): ON
--   ESD                    (Wanted: OFF): OFF
--   ESD_SHARED             (Wanted: OFF): OFF
--   FUSIONSOUND            (Wanted: OFF): OFF
--   FUSIONSOUND_SHARED     (Wanted: OFF): OFF
--   GCC_ATOMICS            (Wanted: OFF): OFF
--   INPUT_TSLIB            (Wanted: OFF): OFF
--   LIBC                   (Wanted: ON): ON
--   MMX                    (Wanted: ON): ON
--   NAS                    (Wanted: OFF): OFF
--   OSS                    (Wanted: OFF): OFF
--   PTHREADS               (Wanted: OFF): OFF
--   PTHREADS_SEM           (Wanted: OFF): OFF
--   PULSEAUDIO             (Wanted: OFF): OFF
--   PULSEAUDIO_SHARED      (Wanted: OFF): OFF
--   RENDER_D3D             (Wanted: OFF): OFF
--   RPATH                  (Wanted: OFF): OFF
--   SDL_DLOPEN             (Wanted: ON): ON
--   SSE                    (Wanted: ON): ON
--   SSE2                   (Wanted: ON): ON
--   SSEMATH                (Wanted: ON): ON
--   VIDEO_COCOA            (Wanted: ON): ON
--   VIDEO_DIRECTFB         (Wanted: OFF): OFF
--   VIDEO_DUMMY            (Wanted: ON): ON
--   VIDEO_OPENGL           (Wanted: ON): ON
--   VIDEO_OPENGLES         (Wanted: ON): OFF
--   VIDEO_X11              (Wanted: OFF): OFF
--   VIDEO_X11_XCURSOR      (Wanted: OFF): OFF
--   VIDEO_X11_XINERAMA     (Wanted: OFF): OFF
--   VIDEO_X11_XINPUT       (Wanted: OFF): OFF
--   VIDEO_X11_XRANDR       (Wanted: OFF): OFF
--   VIDEO_X11_XSCRNSAVER   (Wanted: OFF): OFF
--   VIDEO_X11_XSHAPE       (Wanted: OFF): OFF
--   VIDEO_X11_XVM          (Wanted: OFF): OFF
--   X11_SHARED             (Wanted: OFF): OFF
--
--  CFLAGS:        -g -O3
--  EXTRA_CFLAGS:  -msse2 -msse -mmmx
--  EXTRA_LDFLAGS:
--  EXTRA_LIBS:    m;iconv;/System/Library/Frameworks/Cocoa.framework;/System/Library/Frameworks/IOKit.framework;/System/Library/Frameworks/ForceFeedback.framework;/System/Library/Frameworks/Carbon.framework;/System/Library/Frameworks/CoreAudio.framework;/System/Library/Frameworks/AudioUnit.framework
--
--  Build Shared Library: ON
--  Build Static Library: ON
--
-- Something was not detected, although your are sure that it
-- has been properly installed? Then make sure, you have set
-- the CFLAGS and LDFLAGS environment variables correctly.

dougs-Mac-mini:build doug$ ninja
...
[231/231] Linking C static library libSDL2.a
dougs-Mac-mini:build doug$ ls
CMakeCache.txt      Makefile            build.ninja         include             libSDL2.2.0.0.dylib libSDL2.dylib       rules.ninja         sdl2.pc
CMakeFiles          SDL2.spec           cmake_install.cmake libSDL2.0.dylib     libSDL2.a           libSDL2main.a       sdl2-config


~

Doug.



On Fri, May 24, 2013 at 11:39 PM, Gabriele Greco wrote:


Quote:

Quote:
I am currently trying to do all the necessary touchups to my engine so I can get a working MacOSX port up and running. I have SDL being built through CMake which is integrated into the CMake configuration of my engine. SDL compiles just fine as a dependency, however when it attempts to link it errors in "SDL_Log.c" saying it can't find the symbol "_SDL_NSLog". I have looked through the code and I found the method it's talking about in "SDL_cocoavideo.m". As far as I can tell the project seems to be configured correctly for that files inclusion in the project.





I'm quite sure I've had that problem too when trying to build with CMake on OSX, so after a few failed attempts to fix the CMakeLists.txt I switched back to build with autotools, the problem I had was that some of the .m files do not get complied also if they are correctly added in the respective directories...  I thought it was some problem with my version of cmake and gave up since I had not a lot of time at the moment :)



--
Bye, Gabry



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org