Re: g++ compilation problem

Posted by Amadeus W.M. on
URL: http://quantlib.414.s1.nabble.com/g-compilation-problem-tp6800p6804.html

On Fri, 27 Mar 2009 23:13:27 +0100, Luigi Ballabio wrote:

> On Mar 27, 2009, at 10:54 PM, Amadeus W.M. wrote:
>
>> On Fri, 27 Mar 2009 17:56:07 +0100, Luigi Ballabio wrote:
>>
>>> That should be the way to do it---and in fact, it works here on my
>>> Ubuntu box with gcc 4.3.2.  I'm using the svn repository, though--
>>> I'll
>>> check 0.3.7 tomorrow and let you know.
>>>
>>> Luigi
>>
>> Thanks for looking into this. Did you really mean 0.3.7? I was trying
>> against 0.9.7.
>
> Yes, I meant 0.9.7, of course.  I also meant "Monday" when I wrote
> "tomorrow". At least I got the gcc version right...
>
> Luigi
>
>
>
------------------------------------------------------------------------------


Compiles if I specify the library directory with -L, like so:


g++ -g -Wall -o EquityOption -L/usr/local/lib -I/usr/local/include/
boost-1_38 EquityOption.cpp -lQuantLib

Without -L/usr/local/lib it doesn't. This is strange because

/sbin/ldconfig -v

does pick up /usr/local/lib so the linker should know about it.


ldd EquityOption

        linux-gate.so.1 =>  (0x00110000)
        libQuantLib-0.9.7.so => /usr/local/lib/libQuantLib-0.9.7.so
(0x00c09000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x042f6000)
        libm.so.6 => /lib/libm.so.6 (0x00111000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x058b3000)
        libc.so.6 => /lib/libc.so.6 (0x0013a000)
        /lib/ld-linux.so.2 (0x00beb000)

so it's linked against QuantLib.so. Don't know why I need to specify -L
but at any rate, this is acceptable for now, I'll figure it out later.

Thanks for QuantLib! Looking forward to using it.


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users