02-26-07 12:16 AM
On Feb 25, 2:19 pm, Paul Pluzhnikov <ppluzhnikov-...@charter.net>
wrote:
> "vivekian" <vivekli...@gmail.com> writes:
>
> These steps are un-necessarily complicated.
> You are (apparently) following some DSO-HOWTO, but without
> understanding why things are done in "complicated" way, and whether
> that complicated way is appropriate for your situation.
>
>
> Until you need "external library versioning", I suggest you use
> "simple" way:
>
> g++ -shared -o libcppsocket.so \
> SockException.o Socket.o TcpSocket.o UdpSocket.o SocketReaderWriter.o
>
>
>
>
>
> Correct.
>
>
> And it shouldn't help. Provided /usr/lib/libcppsocket.so exists,
> correct link line is:
>
> g++ main.cpp -lcppsocket
>
>
> Well, for starters you didn't tell us (nor paid attention to)
> the error linker gave you, which likely was:
>
> /usr/bin/ld: cannot find -llibcppsocket
Yes, you are right , i didnt mention that , but yes i did notice it.
>
> Please read "info gcc" to understand what library the linker will
> search for given '-llibcppsocket' argument. Hint libcppsocket.*
> it is not.
I did. This is the relevant portion i guess :
"The only difference between using an -l option and specifying a file
name is that -l surrounds library with lib and .a and searches
several directories"
That solved the problem. It compiles fine. I was following a HowTo
without understanding .
Thanks a ton . Appreciate it.
vivekian
[ Post a follow-up to this message ]
|