Patrice Colet wrote:
Hello!
I've added -mno-cygwin and -I/cygdrive/c/Mingw/include -L/cygdrive/c/Mingw/lib because:
1° The __WIN32 flag doesn't work with cygwin 2° there is a cruel conflict with errno.h cygwin version.
So it's not possible to compile with cygwin without mingw, unless using voodoo...
Well it seems like the Windows API that mingw provides is essential for the audio and midi interfaces, unless you have a precompiled portmidi and portaudio. The rest could be done in cygwin's pseudo-unix, probably not GEM though. I think if there was a tcl/tk for cygwin it would be even more compatible with the unix version. ...
cc -g -O2 -DPD -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-s witch -mno-cygwin -DUSEAPI_PORTAUDIO -DPA_LITTLE_ENDIAN -DPA19 -I/cygdr ive/c/Mingw/include -L/cygdrive/c/Mingw/lib -I../portaudio/pa_common -I../po rtaudio/pablio -I../portaudio/pa_asio -I../portmidi/pm_common -I../portmidi/po rttime -I../portmidi/pm_win -I../portmidi/pm_win_ds -mms-bitfields -DINSTA LL_PREFIX="/usr/local" -c -o ../obj/g_canvas.o g_canvas.c g_canvas.c:58: erreur: un 'el'ement de l'initialisation n'est pas une constante g_canvas.c:59: erreur: un 'el'ement de l'initialisation n'est pas une constante
Line 58: static t_symbol *canvas_newfilename = &s_;
Probably the compiler doesn't like this because _s is declared EXTERN which is configured for MSW instead of just extern.
g_canvas.c:574: attention : << canvas_makebindsym >> d'efini localement apr`es a voir 'et'e r'ef'erenc'e avec lien dllimport.
It was prototyped in g_canvas.h as EXTERN t_symbol *canvas_makebindsym(t_symbol *s); In m_pd.h EXTERN is defined as: #ifdef MSW #ifdef PD_INTERNAL #define EXTERN __declspec(dllexport) extern #else #define EXTERN __declspec(dllimport) extern #endif /* PD_INTERNAL */ #else #define EXTERN extern #endif /* MSW */ so you probably need to avoid using MSW here for cygwin because the __declspec stuff only works with MSVC. The extern things must be accessible from outside the pd dll so you need to export the symbols somehow. ...
==========================================================================
I have to give up for the moment, even if I've just replaced MSW with __WIN32 and added a few lines of codes to configure.in and makefile.in, it took me too much time for no satisfying results.
Oh, too bad... I tried it a couple years ago as well and didn't get it to work either, but I learned a lot about the insides of pd;).
Martin