cygwin:g++linker problems
Tim Prince
TimothyPrince@sbcglobal.net
Fri Oct 17 15:28:00 GMT 2008
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/
More information about the Cygwin
mailing list