[1.2] [OS X+Xcode]-BuildsOK, Does Not Run?

[1.2] [OS X+Xcode]-Builds OK, Does Not Run ???

Hi,

I am trying to port my SDL1.2+OpenGL game:
LettersFall 2
to Mac OS X 10.6.2…

I installed Xcode and have the game building OK on it.

When I run the built executable I get the following error:--------------------------------------------------------------------------------------
Dyld Error Message:
Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
Referenced from:
/Library/Frameworks/SDL_ttf.framework/Version/A/SDL_ttf
Reason: image not found

Do not know how to fix this…
Any help would be appreciated!

Also, do I need to place something in the executable’s folder
for SDL1.2, SDL_image, SDL_mixer, SDL_ttf ?
( like DLL’s on Windows® )

Jesse

[1.2] [OS X+Xcode]-Builds OK, Does Not Run ???

Hi,

I am trying to port my SDL1.2+OpenGL game:
LettersFall 2
to Mac OS X 10.6.2…

I installed Xcode and have the game building OK on it.

When I run the built executable I get the following error:

Dyld Error Message:
Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
Referenced from:
/Library/Frameworks/SDL_ttf.framework/Version/A/SDL_ttf
Reason: image not found

Do not know how to fix this…
Any help would be appreciated!

I need some information about your system. Please open Terminal.app
and do the following:
ls -l /usr
(Please paste the results. I am looking for the directories X11R6 and X11)

Assuming you have these directories, do this for each:
ls -l /usr/X11R6/lib/libfreetype*

ls -l /usr/X11/lib/libfreetype*

Paste the results for each case.

Also, do I need to place something in the executable’s folder
for SDL1.2, SDL_image, SDL_mixer, SDL_ttf ?
( like DLL’s on Windows® )

You need to put the .frameworks you use (SDL.framework,
SDL_ttf.framework) in your .app bundle. You’ll need to solve the
freetype problem first though.

This video shows how to do it for OpenSceneGraph. Same concept for
SDL. (SDL is a bit easier because there is less stuff.
http://playcontrol.net/ewing/screencasts/how_to_create_an_app_bundle.html

-EricOn 9/11/10, Jesse Palser wrote:

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

Hi,

Thank you for responding to my post, here are the results:On 09/11/2010 05:37 PM, Eric Wing wrote:

On 9/11/10, Jesse Palser wrote:

[1.2] [OS X+Xcode]-Builds OK, Does Not Run ???

Hi,

I am trying to port my SDL1.2+OpenGL game:
LettersFall 2
to Mac OS X 10.6.2…

I installed Xcode and have the game building OK on it.

When I run the built executable I get the following error:

Dyld Error Message:
Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
Referenced from:
/Library/Frameworks/SDL_ttf.framework/Version/A/SDL_ttf
Reason: image not found

Do not know how to fix this…
Any help would be appreciated!

I need some information about your system. Please open Terminal.app
and do the following:
ls -l /usr
(Please paste the results. I am looking for the directories X11R6 and X11)

Assuming you have these directories, do this for each:
ls -l /usr/X11R6/lib/libfreetype*

ls -l /usr/X11/lib/libfreetype*

Paste the results for each case.

Also, do I need to place something in the executable’s folder
for SDL1.2, SDL_image, SDL_mixer, SDL_ttf ?
( like DLL’s on Windows® )
You need to put the .frameworks you use (SDL.framework,
SDL_ttf.framework) in your .app bundle. You’ll need to solve the
freetype problem first though.

This video shows how to do it for OpenSceneGraph. Same concept for
SDL. (SDL is a bit easier because there is less stuff.
http://playcontrol.net/ewing/screencasts/how_to_create_an_app_bundle.html

-Eric


JeZ-Lees-Mac:~ jezlee$ ls -l /usr

total 0

drwxr-xr-x 4 root wheel 136 Sep 12 09:33 X11

drwxr-xr-x 1063 root wheel 36142 Sep 12 09:37 bin

drwxr-xr-x 271 root wheel 9214 Sep 12 09:33 include

drwxr-xr-x 377 root wheel 12818 Sep 12 09:34 lib

drwxr-xr-x 100 root wheel 3400 Sep 12 09:34 libexec

drwxr-xr-x 236 root wheel 8024 Sep 12 09:34 sbin

drwxr-xr-x 72 root wheel 2448 Sep 12 09:34 share

drwxr-xr-x 4 root admin 136 Nov 24 2009 standalone


JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11R6/lib/libfreetype*

ls: /usr/X11R6/lib/libfreetype*: No such file or directory


JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/lib/libfreetype*

ls: /usr/X11/lib/libfreetype*: No such file or directory


Hope you can help!
Thanks

Jesse

drwxr-xr-x 4 root wheel 136 Sep 12 09:33 X11

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11R6/lib/libfreetype*
ls: /usr/X11R6/lib/libfreetype*: No such file or directory

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/lib/libfreetype*
ls: /usr/X11/lib/libfreetype*: No such file or directory

Just so I have all the information I may need (especially if this
happens to somebody else in the future), please tell me the output of:
ls -l /usr/X11/include/

ls -l /usr/X11/lib

And finally, do you have X11.app in /Applications/Utilities
(You can use Finder to find this one)
If you do, open it an run it. Does it install anything to your system?
Does libfreetype* appear on your system afterwards?

So the problem is obvious. You don’t have freetype installed on your
system. I think you did a custom install and deselected the X11
package from the optional packages when you installed Snow Leopard.
Did you do this? If so, that’s your problem.

Freetype is an X11 component that SDL_ttf depends on. If you did do a
standard install and you don’t have it, we have a much bigger and
harder problem to solve because all my distribution assumptions assume
this is installed by default. So I really hope you tell me you
deselected X11.

So if you did avoid installing X11, then please find your Snow Leopard
DVD and install that package. Then please rerun:
ls -l /usr

The other piece of the puzzle is that I’m hoping Apple (still?)
creates a symlink between X11R6 and X11. If this doesn’t happen, we
have a secondary problem.

Thanks,
Eric–
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

Hi,

Thank you.
I got it working with the help of an OS X programmer.

JesseOn 09/12/2010 04:45 PM, Eric Wing wrote:

drwxr-xr-x 4 root wheel 136 Sep 12 09:33 X11

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11R6/lib/libfreetype*
ls: /usr/X11R6/lib/libfreetype*: No such file or directory

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/lib/libfreetype*
ls: /usr/X11/lib/libfreetype*: No such file or directory

Just so I have all the information I may need (especially if this
happens to somebody else in the future), please tell me the output of:
ls -l /usr/X11/include/

ls -l /usr/X11/lib

And finally, do you have X11.app in /Applications/Utilities
(You can use Finder to find this one)
If you do, open it an run it. Does it install anything to your system?
Does libfreetype* appear on your system afterwards?

So the problem is obvious. You don’t have freetype installed on your
system. I think you did a custom install and deselected the X11
package from the optional packages when you installed Snow Leopard.
Did you do this? If so, that’s your problem.

Freetype is an X11 component that SDL_ttf depends on. If you did do a
standard install and you don’t have it, we have a much bigger and
harder problem to solve because all my distribution assumptions assume
this is installed by default. So I really hope you tell me you
deselected X11.

So if you did avoid installing X11, then please find your Snow Leopard
DVD and install that package. Then please rerun:
ls -l /usr

The other piece of the puzzle is that I’m hoping Apple (still?)
creates a symlink between X11R6 and X11. If this doesn’t happen, we
have a secondary problem.

Thanks,
Eric

Hi,

Thank you.
I got it working with the help of an OS X programmer.

Jesse

Actually, I was hoping you would report back on those things I asked
because it may be useful information for us to make better decisions
about the packaging assumptions in the future.

At the very least, does Apple automatically create a symlink for X11R6 to X11?

Thanks,
-Eric–
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

Hi,

Here is the requested information:On 09/12/2010 07:53 PM, Eric Wing wrote:

Hi,

Thank you.
I got it working with the help of an OS X programmer.

Jesse
Actually, I was hoping you would report back on those things I asked
because it may be useful information for us to make better decisions
about the packaging assumptions in the future.

At the very least, does Apple automatically create a symlink for X11R6 to X11?

Thanks,
-Eric


JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/include/
total 24
drwxr-xr-x 33 root wheel 1122 Sep 12 09:33 GL
drwxr-xr-x 89 root wheel 3026 Sep 12 09:33 X11
drwxr-xr-x 12 root wheel 408 Jul 6 2009 cairo
drwxr-xr-x 5 root wheel 170 Jul 11 2009 fontconfig
drwxr-xr-x 3 root wheel 102 Jul 11 2009 freetype2
-rw-r–r-- 1 root wheel 3890 Jul 11 2009 ft2build.h
drwxr-xr-x 4 root wheel 136 Jul 6 2009 libpng12
drwxr-xr-x 4 root wheel 136 Jul 6 2009 pixman-1
lrwxr-xr-x 1 root wheel 14 Sep 12 09:33 png.h -> libpng12/png.h
lrwxr-xr-x 1 root wheel 18 Sep 12 09:33 pngconf.h ->
libpng12/pngconf.h
drwxr-xr-x 41 root wheel 1394 Jul 6 2009 xcb

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/lib
ls: /usr/X11/lib: No such file or directory

I’ve got it working now in the best way possible.
My friend compiled a FreeType framework
and I added it to the game’s app bundle
in Xcode.

Thanks!

Jesse

Eric,

My install of OS X 10.6 is not quite untouched, as I have xcode and a
couple of libraries I compiled myself. I do not believe that any of
those compiles changed anything in the X11 directories. I know I did
not change them manually.

On both my machines, X11 is symlinked to X11R6, and there is a
libfreetype.dylib in the lib directory.

I’m not certain if the initial install put the X11 libraries on, or if
installing xcode was when it came in. Unfortunately, I’ve done
development on all my machines, so I don’t have a pure install to give
you data from.

-MattOn Mon, Sep 13, 2010 at 4:52 AM, Jesse Palser wrote:

?On 09/12/2010 07:53 PM, Eric Wing wrote:

Hi,

Thank you.
I got it working with the help of an OS X programmer.

Jesse

Actually, I was hoping you would report back on those things I asked
because it may be useful information for us to make better decisions
about the packaging assumptions in the future.

At the very least, does Apple automatically create a symlink for X11R6 to
X11?

Thanks,
-Eric

Hi,

Here is the requested information:

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/include/
total 24
drwxr-xr-x ?33 root ?wheel ?1122 Sep 12 09:33 GL
drwxr-xr-x ?89 root ?wheel ?3026 Sep 12 09:33 X11
drwxr-xr-x ?12 root ?wheel ? 408 Jul ?6 ?2009 cairo
drwxr-xr-x ? 5 root ?wheel ? 170 Jul 11 ?2009 fontconfig
drwxr-xr-x ? 3 root ?wheel ? 102 Jul 11 ?2009 freetype2
-rw-r–r-- ? 1 root ?wheel ?3890 Jul 11 ?2009 ft2build.h
drwxr-xr-x ? 4 root ?wheel ? 136 Jul ?6 ?2009 libpng12
drwxr-xr-x ? 4 root ?wheel ? 136 Jul ?6 ?2009 pixman-1
lrwxr-xr-x ? 1 root ?wheel ? ?14 Sep 12 09:33 png.h -> libpng12/png.h
lrwxr-xr-x ? 1 root ?wheel ? ?18 Sep 12 09:33 pngconf.h ->
libpng12/pngconf.h
drwxr-xr-x ?41 root ?wheel ?1394 Jul ?6 ?2009 xcb

JeZ-Lees-Mac:~ jezlee$ ls -l /usr/X11/lib
ls: /usr/X11/lib: No such file or directory

I’ve got it working now in the best way possible.
My friend compiled a FreeType framework
and I added it to the game’s app bundle
in Xcode.

Thanks!

Jesse


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

Thanks for the information. Is your Snow Leopard an upgrade install
from an older version of the OS or did your machine start with Snow
Leopard?

-EricOn 9/13/10, Matthew Kuiken <matt.kuiken at gmail.com> wrote:

Eric,

My install of OS X 10.6 is not quite untouched, as I have xcode and a
couple of libraries I compiled myself. I do not believe that any of
those compiles changed anything in the X11 directories. I know I did
not change them manually.

On both my machines, X11 is symlinked to X11R6, and there is a
libfreetype.dylib in the lib directory.

I’m not certain if the initial install put the X11 libraries on, or if
installing xcode was when it came in. Unfortunately, I’ve done
development on all my machines, so I don’t have a pure install to give
you data from.

-Matt


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

One was upgraded, the other was bought with SL installed.On Mon, Sep 13, 2010 at 11:43 PM, Eric Wing wrote:

On 9/13/10, Matthew Kuiken <@Matthew_Kuiken> wrote:

Eric,

My install of OS X 10.6 is not quite untouched, as I have xcode and a
couple of libraries I compiled myself. ?I do not believe that any of
those compiles changed anything in the X11 directories. ?I know I did
not change them manually.

On both my machines, X11 is symlinked to X11R6, and there is a
libfreetype.dylib in the lib directory.

I’m not certain if the initial install put the X11 libraries on, or if
installing xcode was when it came in. ?Unfortunately, I’ve done
development on all my machines, so I don’t have a pure install to give
you data from.

-Matt

Thanks for the information. Is your Snow Leopard an upgrade install
from an older version of the OS or did your machine start with Snow
Leopard?

-Eric

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


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