public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Compiling app under Cygwin V1.0 that doesn't require Cygwin1.dll
       [not found] <952574635.4503.ezmlm@sourceware.cygnus.com>
@ 2000-03-09 13:40 ` Larry E. Wagner
  2000-03-09 13:50   ` Chris Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Larry E. Wagner @ 2000-03-09 13:40 UTC (permalink / raw)
  To: cygwin

I have an apparent problem with compiling a correctly working C program
I have with the -no-cygwin option and using the mingw libraries/headers.
I get the program to compile and link correctly.  It will run.  However,
sometimes it will print a "$" in place of a numeric digit in the output file
when specific valid input files are selected.  We originally discovered this
problem with a version of the program compiled under the B20.1 environment.
The problem still exists under the Cygwin V1.0 environment.  Upgrading the
version of gcc to 95.2 didn't help either.  A version of the program compiled
under the standard default cygwin environment does NOT exhibit this behavior.
Neither does a Unix version compiled with gcc on a Sun Ultra 10.

So, the problem appears to be some type of obscure bug in the DLL library
handling the fprintf() statements when compiling/linking with the -no-cygwin
option specified.

At this point, it appears that I have three options to create a standalone,
single file executable that can be run on any Windows PC without providing
a separate copy of the Cygwin1.dll:

1.  Somehow determine the source of the actual bug causing my problem.
This appears unlikely, unless someone out there on the list knows how I should
proceed to find it and possibly fix it.

2.  Determine the correct commandline incantations for the gcc compile/link 
steps to include the necessary Cygwin1.dll functionality required into the
application executable.  So far, I have not been successful doing so.
Any pointers on how to correctly do this would be appreciated as this would
be the quickest and easiest solution for me.

3.  Configure "cook", a make-like program I use to control builds of my
applications, to use a different, eg. commercial, PC compiler/linker.  This is
doable, but it requires a lot of additional conditional code to handle
the differences between "PC-style" builds and "Unix-style" builds, making
the "cookbook" files harder to maintain for use on different platforms.

So, I would appreciate any suggestions on how to accomplish option 2
above successfully.  Of course, any comments regarding option 1 are
welcome as well.

LEW

-- 
Larry Wagner, Agricultural Engineer | E-mail: wagner@weru.ksu.edu
USDA-ARS Wind Erosion Research Unit | phone:  (785) 532-6807
Throckmorton Hall, KSU              | fax:    (785) 532-6528
Manhattan, KS 66506                 | URL:    http://www.weru.ksu.edu

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compiling app under Cygwin V1.0 that doesn't require Cygwin1.dll
  2000-03-09 13:40 ` Compiling app under Cygwin V1.0 that doesn't require Cygwin1.dll Larry E. Wagner
@ 2000-03-09 13:50   ` Chris Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Faylor @ 2000-03-09 13:50 UTC (permalink / raw)
  To: cygwin

On Thu, Mar 09, 2000 at 03:40:26PM -0600, Larry E. Wagner wrote:
>So, the problem appears to be some type of obscure bug in the DLL library
>handling the fprintf() statements when compiling/linking with the -no-cygwin
>option specified.

The DLL library in a mingw application comes from Microsoft.  There is no
cygwin component.

>1.  Somehow determine the source of the actual bug causing my problem.
>This appears unlikely, unless someone out there on the list knows how I should
>proceed to find it and possibly fix it.

The usual way to debug something like this is to try to develop a repeatable
test case and then run your program under gdb to determine its cause.

It's possible that there is a bug in Microsoft's DLL but I can't remember
ever hearing about something like this.

It might be more beneficial to send your problem report to one of the
microsoft programmer specific newsgroups or mailing lists and ask for
help.

>2.  Determine the correct commandline incantations for the gcc
>compile/link steps to include the necessary Cygwin1.dll functionality
>required into the application executable.  So far, I have not been
>successful doing so.  Any pointers on how to correctly do this would be
>appreciated as this would be the quickest and easiest solution for me.

Just a caveat: If you link any part of cygwin into your program, then your
program becomes open source.  That's how cygwin licensing works.

>3.  Configure "cook", a make-like program I use to control builds of my
>applications, to use a different, eg.  commercial, PC compiler/linker.
>This is doable, but it requires a lot of additional conditional code to
>handle the differences between "PC-style" builds and "Unix-style"
>builds, making the "cookbook" files harder to maintain for use on
>different platforms.

FWIW, make can call msvc.  I would be surprised if that solved your
problem, though.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-03-09 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <952574635.4503.ezmlm@sourceware.cygnus.com>
2000-03-09 13:40 ` Compiling app under Cygwin V1.0 that doesn't require Cygwin1.dll Larry E. Wagner
2000-03-09 13:50   ` Chris Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).