Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] linking with csound framework

Date2008-03-16 18:18
Fromvictor
SubjectRe: [Cs-dev] linking with csound framework
Is there a LINKFLAGS option instead of CFLAGS? Otherwise
yes, I suppose that is your only option.
----- Original Message ----- 
From: "Jonatan Liljedahl" 
To: "Developer discussions" 
Sent: Sunday, March 16, 2008 6:14 PM
Subject: Re: [Cs-dev] linking with csound framework


> victor wrote:
>> libcsnd.dylib is the 'interfaces' library. You need to link 
>> to the CsoundLib framework (compile() is there).
>> 
>> -framework CsoundLib
> 
> I tried the AC_CHECK_FRAMEWORK autoconf macro I found, which checks for
> a framework and adds "-framework " to $LIBS. This worked fine for
> configure, but when running make I got this (see below).
> As you see, the frameworks are not passed to the final linking step of
> gcc. Doing 'make CFLAGS="-framework CsoundLib"' didn't work either, but
> 'make CFLAGS="-Wl,-framework,CsoundLib"' worked. Is this the way one
> should link to a framework or should -framework work?
> 
> /bin/sh ./libtool --tag=CC --mode=link gcc -O2 -g -O2 -DXTHREADS
> -D_REENTRANT -I/opt/local/include/gtk-2.0
> -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0
> -I/opt/local/include/cairo -I/opt/local/include/pango-1.0
> -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
> -I/opt/local/include -I/opt/local/include/freetype2
> -I/opt/local/include/libpng12 -I/usr/X11R6/include     -o algoscore
> algoscore.o playbuslib.o utils.o mathxlib.o csoundlib.o
> nasal/libnasal.la -ldl -lpthread  -framework CsoundLib
> -Wl,-framework,CoreServices,-framework,ApplicationServices
> -L/opt/local/lib -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
> -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lSM -lICE
> -lgobject-2.0 -lgmodule-2.0 -lfreetype -lz -lfontconfig -lexpat -lpng12
> -lXrender -lX11 -lgthread-2.0 -lglib-2.0 -lintl -liconv   -framework Jack
> 
> gcc -O2 -g -O2 -DXTHREADS -D_REENTRANT -I/opt/local/include/gtk-2.0
> -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0
> -I/opt/local/include/cairo -I/opt/local/include/pango-1.0
> -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
> -I/opt/local/include -I/opt/local/include/freetype2
> -I/opt/local/include/libpng12 -I/usr/X11R6/include -o algoscore
> algoscore.o playbuslib.o utils.o mathxlib.o csoundlib.o -Wl,-framework
> -Wl,CoreServices -Wl,-framework -Wl,ApplicationServices
> nasal/.libs/libnasal.a -L/opt/local/lib -L/usr/X11R6/lib -ldl -lpthread
> /opt/local/lib/libgtk-x11-2.0.dylib /opt/local/lib/libgdk-x11-2.0.dylib
> /opt/local/lib/libatk-1.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib
> /opt/local/lib/libtiff.dylib /opt/local/lib/libjpeg.dylib
> /opt/local/lib/libpangocairo-1.0.dylib
> /opt/local/lib/libpangoft2-1.0.dylib /opt/local/lib/libpango-1.0.dylib
> -lm /opt/local/lib/libcairo.dylib -lSM -lICE
> /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib
> /opt/local/lib/libfontconfig.dylib /opt/local/lib/libfreetype.dylib
> /opt/local/lib/libexpat.dylib /opt/local/lib/libpng12.dylib -lz
> /opt/local/lib/libXrender.dylib -lX11
> /opt/local/lib/libgthread-2.0.dylib /opt/local/lib/libglib-2.0.dylib
> /opt/local/lib/libintl.dylib -lc /opt/local/lib/libiconv.dylib
> /usr/bin/ld: Undefined symbols:
> 
> ..all used symbols of jack, libsndfile and csound...
> 
> 
> -- 
> /Jonatan         [ http://kymatica.com ]
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-03-16 18:26
FromJonatan Liljedahl
SubjectRe: [Cs-dev] linking with csound framework
There is LDFLAGS which should probably work..
I'll change the AC_CHECK_FRAMEWORK macro to add -Wl,-framework, to
LDFLAGS if the framework was found, that should work..

victor wrote:
> Is there a LINKFLAGS option instead of CFLAGS? Otherwise
> yes, I suppose that is your only option.
>
> ----- Original Message ----- 
> From: "Jonatan Liljedahl" 
> To: "Developer discussions" 
> Sent: Sunday, March 16, 2008 6:14 PM
> Subject: Re: [Cs-dev] linking with csound framework
> 
> 
>> victor wrote:
>>> libcsnd.dylib is the 'interfaces' library. You need to link 
>>> to the CsoundLib framework (compile() is there).
>>>
>>> -framework CsoundLib
>> I tried the AC_CHECK_FRAMEWORK autoconf macro I found, which checks for
>> a framework and adds "-framework " to $LIBS. This worked fine for
>> configure, but when running make I got this (see below).
>> As you see, the frameworks are not passed to the final linking step of
>> gcc. Doing 'make CFLAGS="-framework CsoundLib"' didn't work either, but
>> 'make CFLAGS="-Wl,-framework,CsoundLib"' worked. Is this the way one
>> should link to a framework or should -framework work?
>>
...

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net