Re: 答复: building quantlib 1.4 in MS Visual Studio 2010

Posted by igitur on
URL: http://quantlib.414.s1.nabble.com/building-quantlib-1-4-in-MS-Visual-Studio-2010-tp15778p15816.html

So it seems you're trying to build the Release|Win32 configuration? Does the "C:\QuantLib\QuantLib-1.4\lib\QuantLib-vc100-mt.lib" file exist? I suspect it would already exist.
And is your Additional Include Directories correctly set as shown below?
Inline images 1

Have you tried building the Debug|Win32 configuration? 

I tried your QuantLib_vc10.vcxproj file and could build both QuantLib and the CDS example projects successfully.

Francois Botha


On 28 August 2014 20:41, Pavan Shah <[hidden email]> wrote:
QuantLib project is built successfully.
Below is a screenshot of Framework and References for project CDS
Inline image 2

Does anything look out of the ordinary?


Also, I am attaching my QuantLib_vc10.vcxproj file.
Pavan


On Thu, Aug 28, 2014 at 10:38 AM, Francois Botha <[hidden email]> wrote:
If QuantLib is already building successfully, then the problem is that the Example projects isn't referencing them correctly. For the example projects, e.g. CDS, check the  project -> Properties -> Common Properties -> Framework and References to see whether it's referencing QuantLib correctly. 

Francois Botha


On 28 August 2014 19:23, Francois Botha <[hidden email]> wrote:
These failures are because QuantLib didn't build successfully, so the dependent projects on it will yield errors. 

Can you perhaps give other examples of errors in the QuantLib project itself?

Francois Botha


On 28 August 2014 19:06, Pavan Shah <[hidden email]> wrote:
Here is the output when I try to build the project CDS.

CDS.cpp(102): error C2065: 'PiecewiseDefaultCurve' : undeclared identifier
1>CDS.cpp(102): error C2065: 'HazardRate' : undeclared identifier
1>CDS.cpp(102): error C2143: syntax error : missing ';' before '>'
1>CDS.cpp(102): error C2143: syntax error : missing ';' before '>'
1>CDS.cpp(108): error C2065: 'hazardRateStructure' : undeclared identifier
1>CDS.cpp(108): error C2227: left of '->nodes' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>CDS.cpp(119): error C2065: 'hazardRateStructure' : undeclared identifier
1>CDS.cpp(119): error C2227: left of '->survivalProbability' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>CDS.cpp(126): error C2065: 'hazardRateStructure' : undeclared identifier
1>CDS.cpp(126): error C2227: left of '->survivalProbability' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>CDS.cpp(137): error C2065: 'hazardRateStructure' : undeclared identifier
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:10.35
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


any idea?

Pavan


On Wed, Aug 27, 2014 at 2:29 AM, Luigi Ballabio <[hidden email]> wrote:
That's weird. I don't see any reason you should have that error. What
are the other ones?

Luigi


On Tue, Aug 26, 2014 at 10:53 PM, Pavan Shah <[hidden email]> wrote:
> For example, lets look at MarketModels project.
>
> This is what I see when I try to build it.
>
> MarketModels.cpp(57): error C2065: 'MarketModel' : undeclared identifier
> 2>MarketModels.cpp(62): error C2678: binary '->' : no operator found which
> takes a left-hand operand of type 'boost::shared_ptr' (or there is no
> acceptable conversion)
> 2>
> C:\Boost\boost_1_52_0\boost_1_52_0\boost/smart_ptr/shared_ptr.hpp(422):
> could be 'T *boost::shared_ptr<X>::operator ->(void) const'
> 2>          while trying to match the argument list '(boost::shared_ptr)'
> 2>MarketModels.cpp(62): error C2039: 'numberOfRates' : is not a member of
> 'boost::shared_ptr'
> 2>
> C:\Boost\boost_1_52_0\boost_1_52_0\boost/smart_ptr/shared_ptr.hpp(165) : see
> declaration of 'boost::shared_ptr'
> 2>MarketModels.cpp(64): error C2653: 'VolatilityBumpInstrumentJacobian' : is
> not a class or namespace name
> 2>MarketModels.cpp(64): error C2065: 'Cap' : undeclared identifier
> 2>MarketModels.cpp(64): error C2133: 'caps' : unknown size
> 2>MarketModels.cpp(64): error C2512: 'std::vector' : no appropriate default
> constructor available
> 2>MarketModels.cpp(69): error C2678: binary '->' : no operator found which
> takes a left-hand operand of type 'boost::shared_ptr' (or there is no
> acceptable conversion)
> 2>
> C:\Boost\boost_1_52_0\boost_1_52_0\boost/smart_ptr/shared_ptr.hpp(422):
> could be 'T *boost::shared_ptr<X>::operator ->(void) const'
> 2>          while trying to match the argument list '(boost::shared_ptr)'
> 2>MarketModels.cpp(69): error C2039: 'initialRates' : is not a member of
> 'boost::shared_ptr'
> 2>
> C:\Boost\boost_1_52_0\boost_1_52_0\boost/smart_ptr/shared_ptr.hpp(165) : see
> declaration of 'boost::shared_ptr'
> 2>MarketModels.cpp(73): error C2653: 'VolatilityBumpInstrumentJacobian' : is
> not a class or namespace name
> 2>MarketModels.cpp(73): error C2065: 'Cap' : undeclared identifier
> 2>MarketModels.cpp(73): error C2146: syntax error : missing ';' before
> identifier 'nextCap'
> 2>MarketModels.cpp(73): error C2065: 'nextCap' : undeclared identifier
>
>
> Keep in mind, I haven't changed anything. I have simply downloaded Boost and
> QuantLib.
>
> Any help?
> thanks
> Pavan
>
>
> On Mon, Aug 25, 2014 at 6:32 PM, cheng li <[hidden email]>
> wrote:
>>
>> Hi Pavan,
>>
>>
>>
>> It will be better you post your error message here to let others to help
>> you figure out.
>>
>>
>>
>> Regards,
>>
>> Cheng
>>
>>
>>
>> 发件人: Pavan Shah [mailto:[hidden email]]
>> 发送时间: 2014年8月26日 5:32
>> 收件人: QuantLib QuantLib
>> 主题: [Quantlib-users] building quantlib 1.4 in MS Visual Studio 2010
>>
>>
>>
>> Hi all,
>>
>> I am only able to build 8 out of 15 projects within this solution.
>>
>> Why is that?
>>
>> 7 builds are failing.
>>
>> All I have done so far is installed Boost and QuantLib 1.4 .
>>
>> I am working with vc10.sln.
>>
>>
>>
>> thanks
>>
>> Pavan
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users






------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users