windows compiling (cygwin)

klaus filip's icon

i am trying to compile my first external with cygwin
i could build the simplemax example, but when i try to compile my own
i am stuck with the following error:

In file included from myobject.c:23: ../../c74support/max-includes/ext_parameter.h:262:27: warning: no newline at end of file

what can this mean?
do i need another SDK for windows?

thanks
klaus

klaus filip's icon

i get the same errors when trying to compile jslider from the examples.
please see the screenshot.
thanks
klaus

1664.screenshotcygwin.png
png
Timothy Place's icon

hi klaus,

the newline thing is just a warning. the real problem is that you need to add a missing .c file to your gcc compile. specifically, you need to add max-includes/common/commonsyms.c.

cheers,
tim

klaus filip's icon

hi tim,
thank you!
please be patient with my next question.
i tried many different options including -lobjc -l -c and -L but could not achieve a nice result.
what exactly should be written in the gcc command?

gcc -shared -mno-cygwin -o simplemax.mxe simplemax.o simplemax.def -L../../c74support/max-includes -lMaxAPI -lcommon/commonsym.c

gives a not found.

also tried simply putting commonsym.c into max-includes...

grmpf
klaus

Timothy Place's icon

Hi Klaus,

Have you looked into the "collect" example in the SDK? It includes a Makefile for compiling with GCC on windows, and it includes compiling commonsyms.c as part of the process.

Hope this helps!
Tim

klaus filip's icon

thanks tim
this pointed me in the right direction.
its -include in the first gcc command:

gcc -c -mno-cygwin -DWIN_VERSION -DWIN_EXT_VERSION -I../../c74support/max-includes -include common/commonsyms.c simplemax.c

so i got my first .mxe )))

cheers
klaus