Reputation: 4929
New to C++ so I'm confused.
Trying to compile a very simple hello world using netbeans and cygwin, and I get this error.
Edit: Also tried from cygwin and got the same error.
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -ladvapi32
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lshell32
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -luser32
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lkernel32
What am I missing? I did a complete install of cygwin.
Thanks
Upvotes: 2
Views: 1552
Reputation: 11
I had to install w32api-runtime (which pulled w32api-headers too) to make cygwin64 proceed with ./configure.
Prior to that, I had to manually install mpfr and mpc - gcc-core-5.2.1 doesn't have these as dependencies somehow, despite it seems to be linked with them, and as a result it refuses to work, crying about missing cygmpfr-4.dll and cygmpc-3.dll. This clearly seems like maintainer/packager lack of care - this latter problem is known for at least four years now...
Upvotes: 1
Reputation: 94
Did you try compiling from the Cygwin shell ?
cat >hello.c <<EOF
#include <stdio.h>
void main()
{
printf("Hello World !!!\n");
}
EOF
gcc -v hello.c
If it works, it's probably a problem with your Netbeans configuration. Especially, you could compare it to the LIBRARY_PATH you have in the gcc logs from the console.
Upvotes: 1