cygwin gcc compiling issues
Finally trodding into the development terrain, so much to learn about C it makes me sick. Just downloaded and installed every package possible for cygwin for my xp machine. I'm going through the max/msp sdk docs, got the minimum external to compile no problems however whenever I try to compile any msp objects I get:
$ gcc -shared -mno-cygwin -o lores~.mxe lores~.o lores~.def -L../../c74support/
max-includes -L../../c74support/msp-includes -lMaxAPI
lores~.o:lores~.c:(.text+0x56): undefined reference to `_z_dsp_free'
lores~.o:lores~.c:(.text+0xeb): undefined reference to `_z_add_signalmethod'
lores~.o:lores~.c:(.text+0x1d3): undefined reference to `_dsp_add'
lores~.o:lores~.c:(.text+0x234): undefined reference to `_dsp_add'
lores~.o:lores~.c:(.text+0xf37): undefined reference to `_z_dsp_setup'
lores~.o:lores~.c:(.text+0xf74): undefined reference to `_sys_getsr'
collect2: ld returned 1 exit status
Any suggestions or points to the right source of infos would greatly be appreciated. Thanks in advance.
Yo Tyler! #include "z_dsp.h"?
Ben
On 5/24/07, Tyler Nitsch wrote:
>
> Finally trodding into the development terrain, so much to learn about C it makes me sick. Just downloaded and installed every package possible for cygwin for my xp machine. I'm going through the max/msp sdk docs, got the minimum external to compile no problems however whenever I try to compile any msp objects I get:
>
>
> $ gcc -shared -mno-cygwin -o lores~.mxe lores~.o lores~.def -L../../c74support/
> max-includes -L../../c74support/msp-includes -lMaxAPI
> lores~.o:lores~.c:(.text+0x56): undefined reference to `_z_dsp_free'
> lores~.o:lores~.c:(.text+0xeb): undefined reference to `_z_add_signalmethod'
> lores~.o:lores~.c:(.text+0x1d3): undefined reference to `_dsp_add'
> lores~.o:lores~.c:(.text+0x234): undefined reference to `_dsp_add'
> lores~.o:lores~.c:(.text+0xf37): undefined reference to `_z_dsp_setup'
> lores~.o:lores~.c:(.text+0xf74): undefined reference to `_sys_getsr'
> collect2: ld returned 1 exit status
>
> Any suggestions or points to the right source of infos would greatly be appreciated. Thanks in advance.
>
Hey Ben.
Just to make sure from what I'm gathering the includey statements go in the top lines of your .c program. I'm using the lores~.c as given in the sdk.. which does include this #include "z_dsp.h" at the top. Is this what your talking about? I'm following the steps given in the Cygwin_gcc_Howto.rtf manual exactly except replacing minimimum wiht lores~ and adding the additional lines -I../../c74support/msp-includes in step 1 and -L../../c74support/msp-includes in step 2
perhaps having the two -L in the gcc command is making things weird.
Well, I don't know - I don't have any experience with gcc on cygwin.
The gcc builds we do on Mac use the -I flag, not -L -- is it possible
that's the problem?
Ben
-I is for headers -L is for libraries.
_Mark
On May 24, 2007, at 3:11 PM, Ben Nevile wrote:
> Well, I don't know - I don't have any experience with gcc on cygwin.
> The gcc builds we do on Mac use the -I flag, not -L -- is it possible
> that's the problem?
>
> Ben
No it still won't work. I'll have a fresh go at it tommorow... thanks for the help!!!
Ahhhh yeah headers and libraries. Thanks Mark. It finally compiled by entering..
gcc -shared -mno-cygwin -o minimum.mxe minimum.o minimum.def -L../../c74support/max-includes -L../../c74support/msp-includes -lMaxAPI -lMaxAudio
seems I wasnt' linking to the MaxAudio.lib