This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygwin:g++linker problems
- From: Tim Prince <TimothyPrince at sbcglobal dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 17 Oct 2008 11:29:48 -0700
- Subject: Re: cygwin:g++linker problems
- References: <229799.77695.qm@web55807.mail.re3.yahoo.com>
- Reply-to: tprince at computer dot org
jayshankar nair wrote:
> Hi,
>
> I am getting compilation problems while linking the test shared libraries in cygwin1.7. gcc,g++ and bin-utils are installed in the system. Works fine in linux.
>
> Files in test directory
> /test
> $ ls
> f.c f.cpp f.o f1.c f1.cpp libf.so libfun.so
>
> Compilation fails with the following message
>
> $ g++ -L. f1.cpp -lf
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
> -lf
> collect2: ld returned 1 exit status.
>
> f1.cpp
> #include<iostream>
> using namespace std;
> void func();
> int main()
> {
> func();
> return 0;
> }
>
> func is implemented in libf.so
>
Assuming those .so are linux shared libraries, they have no chance of
working under cygwin. You must rebuild the libraries with your cygwin
compiler.
--
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/