The path only takes care of the -L part. So you still have to write
g++ bermudanswaption.cpp -lQuantLib.
However, please, post on the mailing list. I'm not working on Mac OS
X, so it's more likely that you find someone there that can help.
Also, tell them what version of Mac OS X you're using. There might be
differences in the required environment variables.
Luigi
On Thu, Aug 7, 2014 at 4:44 PM, Jackie Jin <[hidden email]> wrote:
> Yes I think I did. Attached is a copy of my .bah_profile. Can you see if
> there is any problem? Meanwhile, I want to make sure I understood the
> mechanism behind gcc correctly.
> g++ -I/opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp
> -o bermudanswaption -L/opt/local/lib/ -lQuantLib
> In this command line, -l/opt/local/include/ -l/opt/local/include/boost means
> add the directory to the head of the list of directories to be seared for
> header files. and -L/opt/local/lib/ -IQuantLib means search the library
> -QuantLib when linking. Am I correct?
>
> So I put
>
> export CPLUS_INCLUDE_PATH=/opt/local/include
> export C_INCLUDE_PATH=/opt/local/include
> export DYLD_LIBRARY_PATH=/opt/local/lib
>
> in the bash_profile, I only need to do g++ bermudanswaption.cpp and
> ./a.out. Is this correct?
>
>
>
>
>
>
> On Aug 7, 2014, at 4:57 AM, Luigi Ballabio <[hidden email]> wrote:
>
> And you had removed the other export, right? Does it work if you just
> use export DYLD_LIBRARY_PATH=/opt/local/lib?
>
> Anybody else on Mac OS X having the same problem?
>
> Luigi
>
> On Wed, Aug 6, 2014 at 9:05 PM, Jackie Jin <[hidden email]> wrote:
>
> I tried 1. export
> DYLD_LIBRARY_PATH=/opt/local/mysql/lib:/opt/local/lib:$DYLD_LIBRARY_PATH
> 2. export
> DYLD_LIBRARY_PATH="/opt/local/mysql/lib:/opt/local/lib:$DYLD_LIBRARY_PATH”
> 3. export
> DYLD_LIBRARY_PATH=/opt/local/mysql/lib/:/opt/local/lib:$DYLD_LIBRARY_PATH
> 4. export
> DYLD_LIBRARY_PATH="/opt/local/mysql/lib/:/opt/local/lib:$DYLD_LIBRARY_PATH”
>
> Unfortunately, none of them works.
>
> Jackie
>
> On Aug 6, 2014, at 11:26 AM, Luigi Ballabio <[hidden email]>
> wrote:
>
> Yes, the extra DYLD_LIBRARY_PATH would cause problems. The second one
> would override the first. In your .bash_profile you should probably
> have something like this instead:
>
> export
> DYLD_LIBRARY_PATH=/opt/local/mysql/lib:/opt/local/lib:$DYLD_LIBRARY_PATH
>
> that is, both the paths you want to add, plus whatever was the value
> set by the system before.
> Let me know if this works, so I can update the instructions on the site.
>
> Luigi
>
>
>
> On Wed, Aug 6, 2014 at 4:22 PM, Jackie Jin <[hidden email]> wrote:
>
> Hi there,
> I tried to get Quantlib installed on my Mac OS X. I followed the
> installation on the official
> websitehttp://quantlib.org/install/macosx.shtml. Everything works fine and I
> can use g++ -I/opt/local/include/ -I/opt/local/include/boost
> BermudanSwaption.cpp -o bermudanswaption -L/opt/local/lib/ -lQuantLib to
> compile and run.
> The Appendix: Boost configuration really makes me suffer. No matter if I put
> export DYLD_LIBRARY_PATH=/opt/local/lib in the .bash_profile, I cannot link
> QuantLib against .o files, which means I have to type " g++ bermudanswaption
> -L/opt/local/lib/ -lQuantLib " manually to make it work.
> PS: I also have another export DYLD_LIBRARY_PATH=/opt/local/mysql/lib in my
> bash_profile. Not sure if this command caused the problem.
>
> --
>
>
>
>
> Best,
> Jackie Jin
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
>
>
> --
> <https://implementingquantlib.blogspot.com>
> <https://twitter.com/lballabio>
>
>
>
>
>
> --
> <https://implementingquantlib.blogspot.com>
> <https://twitter.com/lballabio>
>
>
>
--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>
| Free forum by Nabble | Edit this page |