Hi,
I'm quite an idiot when it comes to anything involving UNIX or the commandline, and I'm having a problem I can't seem to get past.
I'm using FreeType in a project of mine. I'd like to build my project and distribute it to other people.
I downloaded and built FreeType using this:
./configure CFLAGS="-arch i386 -arch ppc -mmacosx-version-min=10.4" --enable-shared=no --enable-static=yes
make
sudo make install
I then added libfreetype.a to the "Linked Frameworks" section of my Xcode project.
My project builds and runs perfectly on my machine. But when I try to run it on another machine that has not had FreeType downloaded and installed, I get the error (on the console):
Dyld Error Message:
Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Users/nialgiacomelli/Downloads/FreescapeGL.app/Contents/MacOS/FreescapeGL
Reason: image not found
Which, apart from anything else apparently means that "--enable-shared=no --enable-static=yes" does not, as I would expect, build only a static linking version of FreeType, and/or adding libfreetype.a to Xcode causes it to also find and link with libfreetype.6.dylib.
I also have a Framework of FreeType that I obtained from the internet. It seems not to be embeddable, i.e. if I link against it and then even if I embed it into my application, then my application does not run on another Mac that does not have FreeType.framework in ~/Library/Frameworks or /Library/Frameworks.
I figure this is probably a point of general application, so: what are the general case instructions for building and installing a UNIX-style library, so that I can statically link it into my projects and then distribute them to end-users such that they are able to use them without downloading and installing the support libraries for themselves?
I'm quite an idiot when it comes to anything involving UNIX or the commandline, and I'm having a problem I can't seem to get past.
I'm using FreeType in a project of mine. I'd like to build my project and distribute it to other people.
I downloaded and built FreeType using this:
./configure CFLAGS="-arch i386 -arch ppc -mmacosx-version-min=10.4" --enable-shared=no --enable-static=yes
make
sudo make install
I then added libfreetype.a to the "Linked Frameworks" section of my Xcode project.
My project builds and runs perfectly on my machine. But when I try to run it on another machine that has not had FreeType downloaded and installed, I get the error (on the console):
Dyld Error Message:
Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Users/nialgiacomelli/Downloads/FreescapeGL.app/Contents/MacOS/FreescapeGL
Reason: image not found
Which, apart from anything else apparently means that "--enable-shared=no --enable-static=yes" does not, as I would expect, build only a static linking version of FreeType, and/or adding libfreetype.a to Xcode causes it to also find and link with libfreetype.6.dylib.
I also have a Framework of FreeType that I obtained from the internet. It seems not to be embeddable, i.e. if I link against it and then even if I embed it into my application, then my application does not run on another Mac that does not have FreeType.framework in ~/Library/Frameworks or /Library/Frameworks.
I figure this is probably a point of general application, so: what are the general case instructions for building and installing a UNIX-style library, so that I can statically link it into my projects and then distribute them to end-users such that they are able to use them without downloading and installing the support libraries for themselves?