Giter VIP home page Giter VIP logo

Comments (7)

serializingme avatar serializingme commented on August 28, 2024 1

I had the same problems, fixed it by adding the winsock2.h include before the windows.h include. I have reverted your patch and added the include, and it compiled fine (Gentoo with mingw32 cross-compiler). I will create a pull request.

from pafish.

a0rtega avatar a0rtega commented on August 28, 2024

Hello!

Yes, I'm aware of this problem but I didn't find the solution to it. Looks like some structs missing in linux ming version.

I'll have a look at this, in the worst case I'll drop the compilation of this function in linux.

from pafish.

kdar avatar kdar commented on August 28, 2024

I get these same errors on Win7 running mingw32, mingw64, and TDM-64. What's your build setup for windows, @a0rtega ?

from pafish.

a0rtega avatar a0rtega commented on August 28, 2024

@kdar That's weird. I've compiled on Windows XP in the past and W7 x64 recently, and never had this problem when compiling on Windows.

Can you paste the error trace you have so we can have a look?

from pafish.

kdar avatar kdar commented on August 28, 2024

make -f Makefile.win
gcc.exe -c vbox.c -o Objects/MingW/vbox.o -I"C:/MinGW32/include" -Wall -Wextra -O0
vbox.c: In function 'vbox_mac':
vbox.c:160:3: warning: implicit declaration of function 'GetAdaptersAddresses' [-Wimplicit-function-declaration]
int ret = GetAdaptersAddresses(AF_UNSPEC,GAA_FLAG_INCLUDE_PREFIX,0,0,&alist_size);
^
vbox.c:160:44: error: 'GAA_FLAG_INCLUDE_PREFIX' undeclared (first use in this function)
int ret = GetAdaptersAddresses(AF_UNSPEC,GAA_FLAG_INCLUDE_PREFIX,0,0,&alist_size);
^
vbox.c:160:44: note: each undeclared identifier is reported only once for each function it appears in
vbox.c:162:4: error: unknown type name 'IP_ADAPTER_ADDRESSES'
IP_ADAPTER_ADDRESSES* palist = (IP_ADAPTER_ADDRESSES_)LocalAlloc(LMEM_ZEROINIT,alist_size);
^
vbox.c:162:36: error: 'IP_ADAPTER_ADDRESSES' undeclared (first use in this function)
IP_ADAPTER_ADDRESSES_ palist = (IP_ADAPTER_ADDRESSES_)LocalAlloc(LMEM_ZEROINIT,alist_size);
^
vbox.c:162:57: error: expected expression before ')' token
IP_ADAPTER_ADDRESSES_ palist = (IP_ADAPTER_ADDRESSES_)LocalAlloc(LMEM_ZEROINIT,alist_size);
^
vbox.c:165:27: error: 'ppalist' undeclared (first use in this function)
IP_ADAPTER_ADDRESSES_ ppalist=palist;
^
make: *** [Objects/MingW/vbox.o] Error 1

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=D:/DEV/MSYS64/MINGW64/BIN/../lib/gcc/x86_64-w64-mingw32/4.9.2/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.9.2/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/4.9.2 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-cloog-backend=isl --enable-version-specific-runtime-libs --disable-cloog-version-check --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-cloog=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 4.9.2 (Rev5, Built by MSYS2 project)

from pafish.

a0rtega avatar a0rtega commented on August 28, 2024

Hey @kdar I have just tried with MSYS as you do, and it didn't work for me neither.

I usually build directly with the official MinGW: http://www.mingw.org/

But I also tried with Cygwin now and it worked at the first try (install mingw-gcc-core and make): https://cygwin.com/index.html

Hope it helps, cheers!

from pafish.

a0rtega avatar a0rtega commented on August 28, 2024

This should be fixed in the latest master revision. It checks the defines needed for those functions and structs, and will skip the compilation of that part if not found, triggering a warning.

from pafish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.