This is the mail archive of the cygwin 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: Own Compiled Program Immediately Crashes on Startup


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

Attachment: typescript4
Description: Binary data

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

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