[GEM-dev] compiling GEM externals on OSX (was: [PD] lua scripting for pd objects)
marius schebella
marius.schebella at gmail.com
Sun Apr 13 18:47:36 CEST 2008
hi cyrille and frank,
it was not so easy on osx, I got an error with -export_dynamic because
gcc does not know this flag on osx.
then I tried to remove it, but some other errors showed up.
I then looked how gem gets compiled on my machine and took "inspiration"
from there to finally get an mscube compiling as a standalone gem
external on osx: here are the flags that I used:
g++ -c -I/sw/include -g -O2 -fPIC -freg-struct-return -Os
-falign-loops=32 -falign-functions=32 -falign-jumps=32 -funroll-loops
-ffast-math -mmmx -fpascal-strings -I..
-I/Users/marius/devel/pd-rsync/pd-extended/Gem/src
-I/Users/marius/devel/pd-rsync/pd-extended/pd/src mscube.cpp -o mscube.o
g++ -o mscube.pd_darwin -dynamiclib -mmacosx-version-min=10.3 -undefined
dynamic_lookup -framework QuickTime -framework Carbon -framework AGL
-framework OpenGL ./*.o -L/sw/lib -ldl -lz -lm -lpthread
-L/Users/marius/devel/pd-rsync/pd-extended/pd/bin
rm -f *.o
I am not sure if I need all of these flags and how to write a beautiful
makefile with variables, but with some help, I hope I will figure out.
with the above information, do you think it would be possible to have
one makefile for linux and darwin?
marius.
cyrille henry wrote:
> hello,
>
> Frank Barknecht a écrit :
>> Hallo,
>> chris clepper hat gesagt: // chris clepper wrote:
>>
>>> C++ - Jamie did a lot of this for his personal use.
>>>
>>> I have not used luagl, but I suspect it will not be comparable to C in
>>> speed.
>>
>> luagl is not as fast as C, but it's already much faster than using
>> lots of separators or double gemheads.
>> Regarding Gem-externals: Does anyone have a simple template project
>> how to write and compile a custom Gem external? This could be very
>> useful, but I'm a bit confused how to do this in a simple way.
>>
>
>
> use a gem object (like cube).
> search and replace "cube" by the name of your object in both the ccp and
> h file.
> use this makefile (adjust the name of the file / src directory).
> it should compile.
>
> cyrille
>
>
>> Ciao
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
More information about the GEM-dev
mailing list