Martin Peach a écrit :
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.
I'm trying right now the voodoo solution, because magiks are so interesting...
cc -g -O2 -DPD -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-s witch -DUSEAPI_PORTAUDIO -DPA_LITTLE_ENDIAN -DPA19 -DPD_INTERNAL -I../por taudio/pa_common -I../portaudio/pablio -I../portaudio/pa_asio -I../portmidi/pm _common -I../portmidi/porttime -I../portmidi/pm_win -I../portmidi/pm_win_ds -mms-bitfields -M g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template .c g_io.c g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c g_all _guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c g_toggle.c g_vdia l.c g_vslider.c g_vumeter.c m_pd.c m_class.c m_obj.c m_atom.c m_memory.c m_binbu f.c m_conf.c m_glob.c m_sched.c s_main.c s_inter.c s_file.c s_print.c s_loader.c s_path.c s_entry.c s_audio.c s_midi.c d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d _filter.c d_dac.c d_misc.c d_math.c d_fft.c d_array.c d_global.c d_delay.c d_res ample.c x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c x_time.c x _acoustics.c x_net.c x_qlist.c x_gui.c x_list.c d_soundfile.c s_midi_pm.c s _audio_pa.c s_audio_pablio.c s_audio_paring.c ../portaudio/pa_common/pa_ allocation.c ../portaudio/pa_common/pa_converters.c ../portaud io/pa_common/pa_cpuload.c ../portaudio/pa_common/pa_dither.c ../portaudio/pa_common/pa_front.c ../portaudio/pa_common/pa_ process.c ../portaudio/pa_common/pa_skeleton.c ../portaud io/pa_common/pa_stream.c ../portaudio/pa_common/pa_trace.c ../portaudio/pa_win/pa_win_util.c ../portaudio/pa_win/pa_win _hostapis.c ../portaudio/pa_win_wmme/pa_win_wmme.c ../portaud io/pa_win_ds/pa_win_ds.c ../portaudio/pa_win_ds/dsound_wrapper.c ../portmidi/pm_common/pmutil.c ../portmidi/ pm_common/portmidi.c ../portmidi/pm_win/pmdll.c ../portmidi/pm_win/pmwin.c ../portmidi/pm_win/pmwinmm.c ../portmidi/porttime/ptwinmm.c d_fft_mayer.c d_fftroutine.c
makefile.dependencies
cc -g -O2 -DPD -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-s witch -DUSEAPI_PORTAUDIO -DPA_LITTLE_ENDIAN -DPA19 -DPD_INTERNAL -I../por taudio/pa_common -I../portaudio/pablio -I../portaudio/pa_asio -I../portmidi/pm _common -I../portmidi/porttime -I../portmidi/pm_win -I../portmidi/pm_win_ds -mms-bitfields -DINSTALL_PREFIX="/usr/local" -c -o ../obj/m_binbuf.o m_binb uf.c m_binbuf.c: In function `binbuf_read': m_binbuf.c:733: attention : d'eclaration implicite de la fonction << lseek >> m_binbuf.c:738: attention : d'eclaration implicite de la fonction << close >> m_binbuf.c:741: attention : d'eclaration implicite de la fonction << read >> cd ../obj; cc -o ../bin/pd g_canvas.o g_graph.o g_text.o g_rtext.o g_array.o g_template.o g_io.o g_scalar.o g_traversal.o g_guiconnect.o g_readwrite.o g_edit or.o g_all_guis.o g_bang.o g_hdial.o g_hslider.o g_mycanvas.o g_numbox.o g_toggl e.o g_vdial.o g_vslider.o g_vumeter.o m_pd.o m_class.o m_obj.o m_atom.o m_memory .o m_binbuf.o m_conf.o m_glob.o m_sched.o s_main.o s_inter.o s_file.o s_print.o s_loader.o s_path.o s_entry.o s_audio.o s_midi.o d_ugen.o d_ctl.o d_arithmetic.o d_osc.o d_filter.o d_dac.o d_misc.o d_math.o d_fft.o d_array.o d_global.o d_del ay.o d_resample.o x_arithmetic.o x_connective.o x_interface.o x_midi.o x_misc.o x_time.o x_acoustics.o x_net.o x_qlist.o x_gui.o x_list.o d_soundfile.o s_midi_p m.o s_audio_pa.o s_audio_pablio.o s_audio_paring.o ../portaudio/pa_common/pa_all ocation.o ../portaudio/pa_common/pa_converters.o ../portaudio/pa_common/pa_cpulo ad.o ../portaudio/pa_common/pa_dither.o ../portaudio/pa_common/pa_front.o ../por taudio/pa_common/pa_process.o ../portaudio/pa_common/pa_skeleton.o ../portaudio/ pa_common/pa_stream.o ../portaudio/pa_common/pa_trace.o ../portaudio/pa_win/pa_w in_util.o ../portaudio/pa_win/pa_win_hostapis.o ../portaudio/pa_win_wmme/pa_win_ wmme.o ../portaudio/pa_win_ds/pa_win_ds.o ../portaudio/pa_win_ds/dsound_wrapper. o ../portmidi/pm_common/pmutil.o ../portmidi/pm_common/portmidi.o ../portmidi/pm _win/pmdll.o ../portmidi/pm_win/pmwin.o ../portmidi/pm_win/pmwinmm.o ../portmidi /porttime/ptwinmm.o d_fft_mayer.o d_fftroutine.o \ -ldl -lm -lpthreadGC2 -lwsock32 -lwinmm -lole32 -lstdc++ m_binbuf.o: dans la fonction << binbuf_read >>: /home/pat/pdextended/pd-extended/pd-extended/pd/src/m_binbuf.c:736: r'ef'erence ind'efinie vers << __imp___iob >> /home/pat/pdextended/pd-extended/pd-extended/pd/src/m_binbuf.c:729: r'ef'erence ind'efinie vers << __imp___iob >> /home/pat/pdextended/pd-extended/pd-extended/pd/src/m_binbuf.c:743: r'ef'erence ind'efinie vers << __imp___iob >> m_binbuf.o: dans la fonction << binbuf_write >>: /home/pat/pdextended/pd-extended/pd-extended/pd/src/m_binbuf.c:829: r'ef'erence ind'efinie vers << __imp___iob >> s_main.o: dans la fonction << sys_argparse >>: /home/pat/pdextended/pd-extended/pd-extended/pd/src/s_main.c:872: r'ef'erence in d'efinie vers << __imp___iob >> s_main.o:/home/pat/pdextended/pd-extended/pd-extended/pd/src/s_main.c:278: encor e plus de r'ef'erences ind'efinies suivent vers << __imp___iob >> collect2: ld a retourn'e 1 code d''etat d'ex'ecution make: *** [../bin/pd] Erreur 1
The source code modification is a little bit more complicated because cygwin uses headers from both msw and unix.
pa and pm seems to be built :), but I'm stuck on this last error caused by stdio.h, cygwin provides mingw headers, and the _imp____iob stuff is into /usr/include/mingw/stdio.h:
in /usr/include/mingw/stdio.h line 146
#ifndef __DECLSPEC_SUPPORTED
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
#define _iob (*_imp___iob) /* An array of FILE */
so I've included it like this:
#ifdef __CYGWIN__ #include <mingw/stdio.h> #else #include <stdio.h> #endif
This code seems to work for other files (I've tried it on g_canvas.c), but only if I put, like a Sorcerer's Apprentice, _mingw.h into /usr/include. Well, mingw seems not well implemented in cygwin.
I've also tried a turn by removing #ifndef __DECLSPEC_SUPPORTED just to see if it is related, but no luck...
This issue remains mysterious.
Also I'm still optimistic about Gem because ogl and some other graphic stuff are implemented by cygwin.