puzzel: cannot open file 'QuantLib-vc90-mt-sgd-0_9_7.lib'

Posted by Yan Kuang on
URL: http://quantlib.414.s1.nabble.com/puzzel-cannot-open-file-QuantLib-vc90-mt-sgd-0-9-7-lib-tp7930.html


Hi All,

I am very new to quantlib. I use vs  team system 2008, quantlib 0.97, boost 1.39.

Here is the problem puzzled me;

1. I built quantlib, 'QuantLib-vc90-mt-sgd-0_9_7.lib' is in the lib directory.
2. I build static library libCrr.lib with essentially two files:

clsLGM.h:

#ifndef        _CLS_LGM_H
#define _CLS_LGM_H

#ifdef __cplusplus
extern "C"
#endif
int testQL();

#endif


clsLGM.cpp:

#include "stdafx.h"

#include <ql/quantlib.hpp>


#include <boost/timer.hpp>
#include <iostream>
#include <iomanip>

//#include "clsLGM.h"

using namespace QuantLib;

#ifdef __cplusplus
extern "C"
#endif
int testQL()
{
       
        boost::timer timer;
        std::cout << std::endl;

        Date todaysDate(15, February, 2002);
        Calendar calendar = TARGET();
        Date settlementDate(19, February, 2002);


                Date startDate = calendar.advance(settlementDate,1,Years,
        ModifiedFollowing);

                return startDate.year();
       
        //return 1;
}

3. 'testQL' function is called  from xll addin project (xllCrr) written in C, ( I have to compiled it as C,  excel 2003 don't recognise it's a addin if compiled as C++).

Now is the puzzle:

The xllCrr's link failed: cannot open file 'QuantLib-vc90-mt-sgd-0_9_7.lib'

I don't see why xllCrr need to link with QuantLib-vc90-mt-sgd-0_9_7.lib. Isn't everything quantlib is in libCrr.lib I built?
How does xllCrr  know there is a lib called QuantLib-vc90-mt-sgd-0_9_7.lib. I checked environment variable, but nowhere link to
QuantLib-vc90-mt-sgd-0_9_7.lib.

I set 'Ignore Specific Library' to QuantLib-vc90-mt-sgd-0_9_7.lib in the project setting, I then will get some other errors include quantlib related:

libCrr.lib(clsLGM.obj) : error LNK2019: unresolved external symbol "public: int __thiscall QuantLib::Date::year(void)const " (?year@Date@QuantLib@@QBEHXZ) referenced in function _testQL

May be the project setting for the static library libCrr.lib setting is wrong?

Thanks for you attention,
Yan
Please consider our environment before printing this email.

WARNING - This email and any attachments may be confidential. If received in error, please delete and inform us by return email. Because emails and attachments may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems, you must be cautious. Westpac cannot guarantee that what you receive is what we sent. If you have any doubts about the authenticity of an email by Westpac, please contact us immediately.

It is also important to check for viruses and defects before opening or using attachments. Westpac's liability is limited to resupplying any affected attachments.

This email and its attachments are not intended to constitute any form of financial advice or recommendation of, or an offer to buy or offer to sell, any security or other financial product. We recommend that you seek your own independent legal or financial advice before proceeding with any investment decision.

Westpac Institutional Bank is a division of Westpac Banking Corporation, a company registered in New South Wales in Australia under the Corporations Act 2001 (Cth). Westpac is authorised and regulated in the United Kingdom by the Financial Services Authority and is registered at Cardiff in the United Kingdom as Branch No. BR 106. Westpac operates in the United States of America as a federally chartered branch, regulated by the Office of the Comptroller of the Currency.

Westpac Banking Corporation ABN 33 007 457 141.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users