rhlee
rhlee

Reputation: 4046

Simple gcc compilation on cygwin 64-bit

(This message was asked on the cygwin mailing list as well http://cygwin.com/ml/cygwin/2013-07/msg00457.html)

I'm trying to compile the following basic program on cygwin64:

int main() {
  ;
  return 0;
}

But I get the following errors:

$ gcc test.c
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: cannot find -ladvapi32
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lshell32
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: cannot find -luser32
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lkernel32
collect2: error: ld returned 1 exit status

This is my first time using the 64-bit version of cygwin and I get the feeling I am missing some sort of flag or library.

Upvotes: 2

Views: 2091

Answers (1)

rhlee
rhlee

Reputation: 4046

On 23/07/2013 13:40, Richard H Lee wrote:

On 23/07/2013 13:35, JonY wrote:

Try rerunning setup again, there was a mistake in the w32api-runtime -1 release. -2 should have this fixed.

Yeah, I just installed xxd 5 mins ago and I saw w32api-runtime flash up on the download bar. I figured that was the package and gave gcc another shot. It compiles fine now.

Upvotes: 2

Related Questions