using namespace quantlib not working vc7

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using namespace quantlib not working vc7

svangipu
i have setup quantlib under vc7 on a windows xp laptop.. i have
quantlib working but the namespaces are not working for me.. as soon
as i introduce a namespace i got compile-time errors:
example:
using namespace QuantLib::Pricers;

i get errors
1. errors C2039: 'Pricers': is not a member of 'QuantLib'
2. error C2871:'Pricers':a namespace with this name does not exist..

so as a workaround i am qualifying all references to QuantLib as

QuantLib::FdEuropean callOption =
QuantLib::FdEuropean(QuantLib::Option::Call, currentPrice,
strikePrice, divYield, riskFree, optionLife, vol);

has anyone encountered this kind of problem?.  any ideas to resolve this?


Reply | Threaded
Open this post in threaded view
|

RE: using namespace quantlib not working vc7

Sinha, Amitesh-2
I do not have such issues. Only Error I get this is the following

testsuite fatal error LNK1104: cannot open file
'libboost_unit_test_framework-vc71-mt-sgd-1_32.lib'

Regards
Amitesh

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Satish
Vangipuram
Sent: Sunday, January 09, 2005 10:29 PM
To: [hidden email]
Subject: [Quantlib-users] using namespace quantlib not working vc7


i have setup quantlib under vc7 on a windows xp laptop.. i have
quantlib working but the namespaces are not working for me.. as soon
as i introduce a namespace i got compile-time errors:
example:
using namespace QuantLib::Pricers;

i get errors
1. errors C2039: 'Pricers': is not a member of 'QuantLib'
2. error C2871:'Pricers':a namespace with this name does not exist..

so as a workaround i am qualifying all references to QuantLib as

QuantLib::FdEuropean callOption =
QuantLib::FdEuropean(QuantLib::Option::Call, currentPrice,
strikePrice, divYield, riskFree, optionLife, vol);

has anyone encountered this kind of problem?.  any ideas to resolve this?


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Quantlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================



Reply | Threaded
Open this post in threaded view
|

Re: using namespace quantlib not working vc7

Luigi Ballabio
In reply to this post by svangipu
On 01/09/05 15:29:07, Satish Vangipuram wrote:
> i have setup quantlib under vc7 on a windows xp laptop.. i have
> quantlib working but the namespaces are not working for me.. as soon
> as i introduce a namespace i got compile-time errors:
> example:
> using namespace QuantLib::Pricers;

Satish,
        sub-namespaces no longer exist. Just use "using namespace  
QuantLib;" to import all names into the global namespace.

Later,
        Luigi