Own Compiled Program Immediately Crashes on Startup

Hans Streibel streibel.2006@gmx.net
Wed Jul 18 13:34:00 GMT 2007


> > How can this link order be changed so that the cygwin dll
> > is linked in first?
> 
> Well, for a start, you'd need to link against the cygwin dll directly,
> and it would need to be first on the linker command line.

How can I link to a dll directly? It is a dynamic library so
as far as I know there is nothing the linker could do here.
Under Unix the search order for dynamic libraries may be given
via the environment variable LD_LIBRARY_PATH.
I dont know how things work under windows/cygwin.

> It could also be a problem with the link stage.  Make sure the
> makefile is using 'gcc' to link the application and not trying to invoke
> 'ld' directly.

It is using gcc to link the application. See the attachment.

> One thing, though, by "*my* cygwin Makefile", do you mean the project
> doesn't come with its own makefile and you had to put one together
> yourself?

The package does not come with a makefile for cygwin.
But there is a README for cygwin and there is a generic Unix
makefile with lots of comments on what to change for cygwin.

Thus I copied that Unix makefile and made the necessary
adjustments in within the copy.

> Or is it just the one that the project came with or autogenerated using
> configure or some similar script?

It is an old package. No "configure". You have to do necessary
adjustments directly in the makefile.

Hans

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typescript4
Type: application/octet-stream
Size: 2873 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070718/3da5eaf7/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list