Compiling on Windows using mingw32 I get this:
x86_64-w64-mingw32-gcc -DPACKAGE_NAME="pd" -DPACKAGE_TARNAME="pd" -DPACKAGE_VERSION="0.51.0" -DPACKAGE_STRING="pd\ 0.51.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="pd" -DVERSION="0.51.0" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I. -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common -I../portmidi/portmidi/porttime -DWISH="wish86.exe" -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo './'`s_net.c s_net.c: In function 'addrinfo_get_list': s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did you mean 'SIF_ALL'? hints.ai_flags = AI_ALL | /* both IPv4 and IPv6 addrs */ ^~~~~~ SIF_ALL s_net.c:55:22: note: each undeclared identifier is reported only once for each function it appears in s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); did you mean 'MIDI_MAPPER'? AI_V4MAPPED | /* fallback to IPv4-mapped IPv6 addrs */ ^~~~~~~~~~~ MIDI_MAPPER make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
I'l try to fix this Thursday but if anyone who understands the new networking code gets there before I do you might do a better job than I can...
thanks Miller
On 5/28/20 7:14 AM, Miller Puckette via Pd-dev wrote:
Compiling on Windows using mingw32 I get this:
x86_64-w64-mingw32-gcc -DPACKAGE_NAME="pd" -DPACKAGE_TARNAME="pd" -DPACKAGE_VERSION="0.51.0" -DPACKAGE_STRING="pd\ 0.51.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="pd" -DVERSION="0.51.0" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I. -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common -I../portmidi/portmidi/porttime -DWISH="wish86.exe" -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo './'`s_net.c s_net.c: In function 'addrinfo_get_list': s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did you mean 'SIF_ALL'? hints.ai_flags = AI_ALL | /* both IPv4 and IPv6 addrs */ ^~~~~~ SIF_ALL s_net.c:55:22: note: each undeclared identifier is reported only once for each function it appears in s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); did you mean 'MIDI_MAPPER'? AI_V4MAPPED | /* fallback to IPv4-mapped IPv6 addrs */ ^~~~~~~~~~~ MIDI_MAPPER make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
I'l try to fix this Thursday but if anyone who understands the new networking code gets there before I do you might do a better job than I can...
it's easy: AI_ALL and AI_V4MAPPED are only available since Windows Vista.
the default settings compile for Windows2000 (or so).
to compile for windows vista (and aboce), use the following macros (preferably in the Makefile):
-DWINVER=0x0600 -D_WIN32_WINNT=0x0600
(this is already done in the autotools-Makefile; but afaik not in the src/makefile.mingw)
alternatively (and probably additionally), the use of these macros should probably be protected by ifdef clauses.
in iemnet (which has backported some of the new code from s_net.c) i use:
~~~ hints.ai_flags |= AI_PASSIVE #ifdef AI_ALL | AI_ALL /* both IPv4 and IPv6 addrs */ #endif #ifdef AI_V4MAPPED | AI_V4MAPPED /* fallback to IPv4-mapped IPv6 addrs */ #endif | 0; ~~~
mgfrdsa IOhanne