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: Code using archive file that compiles with g++ on linux but gives linking problem with g++ on cygwin

On 14 June 2006 19:01, Ganesh Ramakrishnan wrote:

> I have an archive libminipar.a. I have a C++ program pdemo.cpp that
> makes use it. 

>     ...    When I compile the program on  linux, I get no errors.
> However, when I compile it on cygwin using g++ version 3.4.4, I get
> the following linking error 

[ snip bunch of error messages that imply absolutely nothing was found in the
library. ]

> Any idea why this should happen? I tried to use the -static flag while
> linking on the linux machine and tried using the binary on cygwin. But
> cygwin did not recognize the binary.

  Nope, you can't run a linux compiled binary on cygwin; the underlying O/S is
too fundamentally different.  Windows doesn't even use ELF format, for a

  So cygwin only emulates linux at the source-code level: everything needs to
be recompiled, but it should just recompile and run straightforwardly.

  Therefore my guess is that you've tried to just move the library archive
across and use it on the cygwin setup.  That also won't work, for exactly the
same reason why moving binaries won't work.  The solution is the same as for
binaries: recompile the library from source, so that you've got a
windows-format library archive.

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

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