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: cygwin:g++linker problems


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/


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