This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: General problems creating executables.


Well, I also do not get an executable, as I reported afew days ago.
I've updated every file available.  However, if it helps,
below I also include the result using "gcc -v"

Lester

$ gcc -o hello hello.c

      0 [main] gcc 1380 proc_subproc: Couldn't duplicate my handle<0x2C> for pid 152, Win32 error 6
Bad Command or file name
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld': Invalid argument
collect2: ld returned 255 exit status

$ gcc -v -o hello hello.c

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cpp0.exe -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -D_X86_=1 -D_X86_=1 -Asystem(winnt) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem /usr/local/include -idirafter /usr/include -idirafter /usr/include/w32api hello.c /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/ccVcZokc.i
GNU CPP version 2.95.3-5 (cygwin special) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include
 /usr/include
 /usr/include/w32api
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cc1.exe /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/ccVcZokc.i -quiet -dumpbase hello.c -version -o /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/cca9KB7t.s
GNU C version 2.95.3-5 (cygwin special) (i686-pc-cygwin) compiled by GNU C version 2.95.3-5 (cygwin special).
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/as.exe -o /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/ccPsa0n0.o /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/cca9KB7t.s
      0 [main] gcc 276 proc_subproc: Couldn't duplicate my handle<0x2C> for pid 153, Win32 error 6
Bad Command or file name
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/collect2.exe -Bdynamic --dll-search-prefix=cyg -o hello.exe /usr/lib/crt0.o -L/usr/local/lib -L/usr/lib -L/usr/lib/w32api -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5 /cygdrive/c/DOCUME~1/ingber/LOCALS~1/Temp/ccPsa0n0.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld': Invalid argument
collect2: ld returned 255 exit status

: David,
: 
: I haven't had a problem with "hello world".  Here's my program and the gcc
: string I used.
: 
: #include <stdio.h>
: 
: main()
: {
:      printf("hello world\n");
: }
: 
: Here's how I compiled it:
: 
: gcc  hello.c   -o hello
: 
: When I run the above gcc command I get the following executable:
: 
: hello.exe
: 
: I run this by typing "hello.exe" at the command promt. It prints "hello
: world" on my screen.
: 
: Perhaps you could use "-v" with gcc to get more verbose output.
: 
: I have in fact run into the problem you're having but only when trying to
: link against a DLL.
: Then I get no warnings, no errors and no executable. I don't yet know why.
: 
: Wish I could tell you more.  I apologize for all the help I've given you
: 8^).
: 
: David

-- 
 Prof. Lester Ingber  ingber@ingber.com  ingber@alumni.caltech.edu
 www.ingber.com                     www.alumni.caltech.edu/~ingber

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]