Linkage problems with Visual Studio 2005

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

Linkage problems with Visual Studio 2005

marco.tarenghi@libero.it
Hi all,
I usually worket with Visual Studio .Net 2003 and now I'm trying to move to Visual Studio 2005.
I succeded in compiling and Building QuantLib but I have problems when building other projects which use QuantLib.
For example I built a simple solution including QuantLib project a new project with only one file: "main.cpp"

#include <iostream>
#include <ql/date.hpp>

using namespace std;
using namespace QuantLib;

int main() {
        Date d(15, March, 2007);   // today's date
        int n = d.serialNumber();
        cout << n << endl;

        return 0;
}


When trying to build the exe file, I have no problems in the compilation, but it exits the build phase returning 2 error messages:

------ Build started: Project: testvc80, Configuration: Debug Win32 ------
Linking...
main.obj : error LNK2019: unresolved external symbol "public: __thiscall QuantLib::Date::Date(int,enum QuantLib::Month,int)" (??0Date@QuantLib@@QAE@HW4Month@1@H@Z) referenced in function _main
c:\testvc80\test\Debug\testvc80.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\testvc80\test\testvc80\Debug\BuildLog.htm"
testvc80 - 2 error(s), 0 warning(s)

I usually found these messages when I used functions that were defined in files not added to the project: so it seems to me that my project does not find correctly the files. I have probably to fix some configurations in the project properties menu.
Any idea?

Thanks,
Marco


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linkage problems with Visual Studio 2005

victor gonzalez-3
Marco,

Did u installed boost successfully - if so please I want to hear from you.
My version keeps failing
Thanks

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: 15 March 2007 14:45
To: quantlib-users
Subject: [Quantlib-users] Linkage problems with Visual Studio 2005

Hi all,
I usually worket with Visual Studio .Net 2003 and now I'm trying to move to
Visual Studio 2005.
I succeded in compiling and Building QuantLib but I have problems when
building other projects which use QuantLib.
For example I built a simple solution including QuantLib project a new
project with only one file: "main.cpp"

#include <iostream>
#include <ql/date.hpp>

using namespace std;
using namespace QuantLib;

int main() {
        Date d(15, March, 2007);   // today's date
        int n = d.serialNumber();
        cout << n << endl;

        return 0;
}


When trying to build the exe file, I have no problems in the compilation,
but it exits the build phase returning 2 error messages:

------ Build started: Project: testvc80, Configuration: Debug Win32 ------
Linking...
main.obj : error LNK2019: unresolved external symbol "public: __thiscall
QuantLib::Date::Date(int,enum QuantLib::Month,int)"
(??0Date@QuantLib@@QAE@HW4Month@1@H@Z) referenced in function _main
c:\testvc80\test\Debug\testvc80.exe : fatal error LNK1120: 1 unresolved
externals
Build log was saved at "file://c:\testvc80\test\testvc80\Debug\BuildLog.htm"
testvc80 - 2 error(s), 0 warning(s)

I usually found these messages when I used functions that were defined in
files not added to the project: so it seems to me that my project does not
find correctly the files. I have probably to fix some configurations in the
project properties menu.
Any idea?

Thanks,
Marco


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
http://i-mode.wind.it







-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linkage problems with Visual Studio 2005

marco.tarenghi@libero.it
In reply to this post by marco.tarenghi@libero.it
Hi Victor,
My problem was not due to Boost library. The only way I could fix my problem was to force the dependence of my project on QuantLib by adding the QuantLib library .lib in Project->Properties->Configuration Properties->Input->Additional Dependencies

I don't know if this is the right way to do it, but now it works fine.

I hope this can help you.

Bye
Marco
---------- Initial Header -----------

>From      : "victor gonzalez" [hidden email]
To          : [hidden email],"quantlib-users" [hidden email]
Cc          :
Date      : Thu, 22 Mar 2007 21:02:31 -0000
Subject : RE: [Quantlib-users] Linkage problems with Visual Studio 2005







> Marco,
>
> Did u installed boost successfully - if so please I want to hear from you.
> My version keeps failing
> Thanks
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 15 March 2007 14:45
> To: quantlib-users
> Subject: [Quantlib-users] Linkage problems with Visual Studio 2005
>
> Hi all,
> I usually worket with Visual Studio .Net 2003 and now I'm trying to move to
> Visual Studio 2005.
> I succeded in compiling and Building QuantLib but I have problems when
> building other projects which use QuantLib.
> For example I built a simple solution including QuantLib project a new
> project with only one file: "main.cpp"
>
> #include <iostream>
> #include <ql/date.hpp>
>
> using namespace std;
> using namespace QuantLib;
>
> int main() {
> Date d(15, March, 2007);   // today's date
> int n = d.serialNumber();
> cout << n << endl;
>
> return 0;
> }
>
>
> When trying to build the exe file, I have no problems in the compilation,
> but it exits the build phase returning 2 error messages:
>
> ------ Build started: Project: testvc80, Configuration: Debug Win32 ------
> Linking...
> main.obj : error LNK2019: unresolved external symbol "public: __thiscall
> QuantLib::Date::Date(int,enum QuantLib::Month,int)"
> (??0Date@QuantLib@@QAE@HW4Month@1@H@Z) referenced in function _main
> c:\testvc80\test\Debug\testvc80.exe : fatal error LNK1120: 1 unresolved
> externals
> Build log was saved at "file://c:\testvc80\test\testvc80\Debug\BuildLog.htm"
> testvc80 - 2 error(s), 0 warning(s)
>
> I usually found these messages when I used functions that were defined in
> files not added to the project: so it seems to me that my project does not
> find correctly the files. I have probably to fix some configurations in the
> project properties menu.
> Any idea?
>
> Thanks,
> Marco
>
>
> ------------------------------------------------------
> Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
> http://i-mode.wind.it
>
>
>
>
>
>
>


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://click.libero.it/imode



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linkage problems with Visual Studio 2005

Luigi Ballabio
In reply to this post by victor gonzalez-3
On Thu, 2007-03-22 at 21:02 +0000, victor gonzalez wrote:
> My version keeps failing

Victor,
        are you using Visual C++ 2005 Express or the full (paid) version? The
Express version needs the Microsoft Platform SDK installed before it can
successfully build Boost---see the note at the end of
<http://www.boost.org/tools/build/v1/vc-8_0-tools.html>. This might be
the reason why you don't find the requires libraries after running bjam.

Luigi



----------------------------------------

I have made this letter longer than usual, only because I have not had
the time to make it shorter.
-- B. Pascal



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users