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.



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




                                                                                                                         
                    <bucky@phantom.keyst                                                                                 
                    reams.com>                 To:     David Westbury <David.Westbury@ipaper.com>                        
                                               cc:                                                                       
                    11/26/2001 03:17 PM        Subject:     Re: General problems creating executables.                   
                                                                                                                         
                                                                                                                         




David,

Thanks for the info.  I was wondering why such simple-sounding information
seemed so hard to find in the faq...

Have you gotten gcc to make executables successfully?  Or have you given
up on compiling, for now?

Thanks,
David

On Mon, 26 Nov 2001, David Westbury wrote:

>
> Hi David,
>
> I too was excited about developing in the cygwin environment. I got
started
> with it a couple of months ago. However I immediately ran into oddities
> similar to those you're experiencing. When you start using DLLs, the
> Windows analogy to Unix shared libraries, I think you'll find your
problems
> ramp up exponentially. Furthermore I haven't found much documentation
> explaining the cygwin programming environment from a Unix programmer's
> perspective.  A solid knowledge of Windows internals seems to be a
> requirement. This is bad news for anyone hoping that cygwin will shelter
> them from the awful MS beast.
>
> Although I continue to monitor this mailing list for new ideas and to
> experiment occasionally I've found that cygwin is most useful because of
> the Unix shell environment it affords. As a general purpose programming
> environment it appears to be largely an academic exercise at this time.
> Obscure workarounds seem to be the norm.
>
> I don't want to sound too discouraging however. Some people seem to be
> doing some heavy duty stuff with cygwin. I just thought you might like to
> know that you're not alone in experiencing the kinds of problems you're
> having. Perhaps it's just people named David. My name is David too.
>
> good luck,
> David
>
>
>
>
>
>
>                     bucky@phantom.keystre
>                     ams.com                     To:     cygwin@cygwin.com
>                     Sent by:                    cc:
>                     cygwin-owner@sources.       Subject:     General
problems creating executables.
>                     redhat.com
>
>
>                     11/26/2001 10:28 AM
>
>
>
>
>
>
> I just installed Cygwin recently (installing pretty much every package
> from the RCN mirror), and am really looking forward to developing on it.
>
> But right now, I'm having problems creating executables.  If I try to
> compile a simple "hello world" program, I don't get an executable.  But,
> if I run a "gcc -v" of it, and enter the resulting commands by hand on
the
> command line, I _do_ get an executable.  Is this something anyone's seen
> before?
>
> Probably related: I don't appear to be getting any error messages from
the
> gcc process - an attempt to compile an invalid C file just failed,
without
> any warnings or error messages.  Is there something I need to set?
>
> I couldn't find any information about either of these in the faq.  Is
> there another document that might be able to help me?
>
>
> Thanks,
> David
>
>
>
>
> --
> 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/
>
>
>
>
>





--
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]