Linking problem with the test suite

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

Linking problem with the test suite

Elise Gourier
 
Hi,
I've just installed QuantLib and I have a problem building the test-suite. I have built the examples without any problems. I use Dev-C++, the last version of Boost (1_35, but I have the same error with version 1_34) and QuantLib 0.9.0. 
At the beginning I got the message "cannot find -lboost_unit_test_framework-mgw-mt" so I changed the name of the library into "libboost_unit_test_framework-mgw-mt.a" (it was "boost_unit_test_framework-mgw34-mt-1_35.lib" before). Now I have the following message:   
variable 'vtable for boost::unit_test::unit_test_log_t' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. 
...
[Linker error] undefined reference to [hidden email]
ld returned 1 exit status
In Project Options>Parameters>Linker I have:

../lib/libQuantLib-mgw-0_9_0.a
-lboost_unit_test_framework-mgw-mt
I spent a lot of time looking on Internet, but did not manage to make it work. I would be very grateful if you could help me.
Thanks a lot.

Cheers,
Elise


 


Plus de 15 millions de français utilisent Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linking problem with the test suite

Toto from_moon
 
Hello,
 
You can not change a .lib filename (present in windows environnement) to a .a static library/archive filename, on Unix environnement.
I mean, .a filenames must not be present on windows environnement, and .lib names on Unix environnement. 
Rather than to change filenames (always a bad idea for me), you have to check your compiler options, name of dependent libraries like boost (.lib on windows) here and paths.

Cheers,
Philippe
 

From: [hidden email]
To: [hidden email]
Date: Wed, 2 Apr 2008 07:52:54 +0000
Subject: [Quantlib-users] Linking problem with the test suite

 
Hi,
I've just installed QuantLib and I have a problem building the test-suite. I have built the examples without any problems. I use Dev-C++, the last version of Boost (1_35, but I have the same error with version 1_34) and QuantLib 0.9.0. 
At the beginning I got the message "cannot find -lboost_unit_test_framework-mgw-mt" so I changed the name of the library into "libboost_unit_test_framework-mgw-mt.a" (it was "boost_unit_test_framework-mgw34-mt-1_35.lib" before). Now I have the following message:   
variable 'vtable for boost::unit_test::unit_test_log_t' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. 
...
[Linker error] undefined reference to [hidden email]
ld returned 1 exit status
In Project Options>Parameters>Linker I have:

../lib/libQuantLib-mgw-0_9_0.a
-lboost_unit_test_framework-mgw-mt
I spent a lot of time looking on Internet, but did not manage to make it work. I would be very grateful if you could help me.
Thanks a lot.

Cheers,
Elise


 


Plus de 15 millions de français utilisent Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !


Arrêtez le ping pong, et recevez votre réponse dans la seconde ! Windows Live Messenger
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linking problem with the test suite

Toto from_moon
 
I downloaded Dev-C++ from the Internet.
 
Since minGW is GCC ported to windows, the filename ../lib/libQuantLib-mgw-0_4_0.a is correct (not very suitable on windows in my opinion however).

I changed the project option parameters :
../lib/libQuantLib-mgw-0_4_0.a
../../boost_1_33_1/stage/lib/libboost_unit_test_framework-mgw.lib

It works perfectly well, as a static library. The only thing you need to do is to compile Boost for minGW.

Regards,
Philippe
 

From: [hidden email]
To: [hidden email]; [hidden email]
Subject: RE: [Quantlib-users] Linking problem with the test suite
Date: Fri, 4 Apr 2008 10:39:58 +0000

Hello,
 
Thank you for your answer. I'm working on Windows, so I kept the .lib files as you said and changed the compiler environment. But I still have the same error... According to what I saw in the FAQ and on Internet, it's related to Dev-C++ and the mingw compiler which is used, but I don't see what to change to fix the problem.
 
Cheers,
 
Elise
 
 
 


From: [hidden email]
To: [hidden email]; [hidden email]
Subject: RE: [Quantlib-users] Linking problem with the test suite
Date: Fri, 4 Apr 2008 10:26:09 +0200

 
Hello,
 
You can not change a .lib filename (present in windows environnement) to a .a static library/archive filename, on Unix environnement.
I mean, .a filenames must not be present on windows environnement, and .lib names on Unix environnement. 
Rather than to change filenames (always a bad idea for me), you have to check your compiler options, name of dependent libraries like boost (.lib on windows) here and paths.

Cheers,
Philippe
 


From: [hidden email]
To: [hidden email]
Date: Wed, 2 Apr 2008 07:52:54 +0000
Subject: [Quantlib-users] Linking problem with the test suite

 
Hi,
I've just installed QuantLib and I have a problem building the test-suite. I have built the examples without any problems. I use Dev-C++, the last version of Boost (1_35, but I have the same error with version 1_34) and QuantLib 0.9.0. 
At the beginning I got the message "cannot find -lboost_unit_test_framework-mgw-mt" so I changed the name of the library into "libboost_unit_test_framework-mgw-mt.a" (it was "boost_unit_test_framework-mgw34-mt-1_35.lib" before). Now I have the following message:   
variable 'vtable for boost::unit_test::unit_test_log_t' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. 
...
[Linker error] undefined reference to [hidden email]
ld returned 1 exit status
In Project Options>Parameters>Linker I have:

../lib/libQuantLib-mgw-0_9_0.a
-lboost_unit_test_framework-mgw-mt
I spent a lot of time looking on Internet, but did not manage to make it work. I would be very grateful if you could help me.
Thanks a lot.

Cheers,
Elise


 


Plus de 15 millions de français utilisent Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !


Arrêtez le ping pong, et recevez votre réponse dans la seconde ! Windows Live Messenger


Tous vos amis discutent sur Messenger, et vous ? Téléchargez Messenger, c'est gratuit !


Partagez une tonne de photos en un instant avec qui vous voulez ! Windows Live Spaces
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linking problem with the test suite

Luigi Ballabio
In reply to this post by Elise Gourier
On Wed, 2008-04-02 at 07:52 +0000, Elise Gourier wrote:
>         I've just installed QuantLib and I have a problem building the
>         test-suite. I have built the examples without any problems. I
>         use Dev-C++, the last version of Boost (1_35, but I have the
>         same error with version 1_34) and QuantLib 0.9.0.
>         At the beginning I got the message "cannot find
>         -lboost_unit_test_framework-mgw-mt" so I changed the name of
>         the library into "libboost_unit_test_framework-mgw-mt.a" (it
>         was "boost_unit_test_framework-mgw34-mt-1_35.lib" before).

Hmm. With Boost 1.34, I have both boost_unit_test_framework-* and
libboost_unit_test_framework-*.  I did have to rename a library, but I
think it was just a matter of changing the extension from lib to a.
Maybe you didn't build all of Boost? I haven't tried 1.35 yet, but a
recent post suggested to add --build-type=complete to the bjam
invocation.

Luigi


--

Poets have been mysteriously silent on the subject of cheese.
-- Gilbert K. Chesterton



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

test-suite and uBlas

Elise Gourier
Thank you Luigi. I have uninstalled Dev-C++, reinstalled it, rebuilt Boost and now the compilation works fine.
 
When I run the test-suite however, I have a problem with the uBlas library, I get the following message:

Unknown location(0) : Fatal error in “MarketModelSmmCapletAlphaCalibrationTest::testFunction”: std::exception this     version of gcc does not support the Boost uBlas library
Unknown location(0) : Fatal error in “MarketModelSmmCapletCalibrationTest::testFunction”: std::exception this version of gcc does not support the Boost uBlas library
Unknown location(0) : Fatal error in “MarketModelSmmCapletHomoCalibrationTest::testFunction”: std::exception this version of gcc does not support the Boost uBlas library
Unknown location(0) : Fatal error in “MarketModelSmmCapletHomoCalibrationTest::testPeriodFunction”: std::exception this version of gcc does not support the Boost uBlas library
Unknown location(0) : Fatal error in “MatricesTest::testInverse”: std::exception this version of gcc does not support the Boost uBlas library
Unknown location(0) : Fatal error in “SwapForwardMappingsTest::testForwardCoterminalMappings”: std::exception this version of gcc does not support the Boost uBlas library
 
I'm working with the last release of Dev C++ which includes gcc 3.4.2. Do you have an idea of how I can fix that? 
 
Thanks a lot in advance.
 
Elise





> Subject: Re: [Quantlib-users] Linking problem with the test suite

> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
> Date: Wed, 9 Apr 2008 17:36:14 +0200
>
> On Wed, 2008-04-02 at 07:52 +0000, Elise Gourier wrote:
> > I've just installed QuantLib and I have a problem building the
> > test-suite. I have built the examples without any problems. I
> > use Dev-C++, the last version of Boost (1_35, but I have the
> > same error with version 1_34) and QuantLib 0.9.0.
> > At the beginning I got the message "cannot find
> > -lboost_unit_test_framework-mgw-mt" so I changed the name of
> > the library into "libboost_unit_test_framework-mgw-mt.a" (it
> > was "boost_unit_test_framework-mgw34-mt-1_35.lib" before).
>
> Hmm. With Boost 1.34, I have both boost_unit_test_framework-* and
> libboost_unit_test_framework-*. I did have to rename a library, but I
> think it was just a matter of changing the extension from lib to a.
> Maybe you didn't build all of Boost? I haven't tried 1.35 yet, but a
> recent post suggested to add --build-type=complete to the bjam
> invocation.
>
> Luigi
>
>
> --
>
> Poets have been mysteriously silent on the subject of cheese.
> -- Gilbert K. Chesterton
>
>


Tous vos amis discutent sur Messenger, et vous ? Téléchargez Messenger, c'est gratuit !
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: test-suite and uBlas

Luigi Ballabio
On Wed, 2008-04-09 at 15:55 +0000, Elise Gourier wrote:

> Thank you Luigi. I have uninstalled Dev-C++, reinstalled it, rebuilt
> Boost and now the compilation works fine.
>  
> When I run the test-suite however, I have a problem with the uBlas
> library, I get the following message:
>
> Unknown location(0) : Fatal error in
> “MarketModelSmmCapletAlphaCalibrationTest::testFunction”:
> std::exception this     version of gcc does not support the Boost
> uBlas library

Yes, it was a false report---Dev-C++ should work. You can edit
ql/math/matrix.hpp at line 29, where it says:

#if !defined(__GNUC__) || __GNUC__ > 3 || __GNUC_MINOR__ > 4
#define QL_MATRIX_BLAS
#endif

Remove the check (the #if and #endif) and just leave

#define QL_MATRIX_BLAS

After recompilation, the tests should pass.

Luigi



--

Every solution breeds new problems.
-- unknown



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linking problem with the test suite

kapild
In reply to this post by Toto from_moon
Thnx ...the solution u provided really works and solved a big prob for me
Toto from_moon wrote
 
I downloaded Dev-C++ from the Internet.
 
Since minGW is GCC ported to windows, the filename ../lib/libQuantLib-mgw-0_4_0.a is correct (not very suitable on windows in my opinion however).
I changed the project option parameters :
../lib/libQuantLib-mgw-0_4_0.a../../boost_1_33_1/stage/lib/libboost_unit_test_framework-mgw.libIt works perfectly well, as a static library. The only thing you need to do is to compile Boost for minGW.
Regards,
Philippe
 


From: elise.gourier@hotmail.frTo: toto_from_moon@hotmail.com; quantlib-users@lists.sourceforge.netSubject: RE: [Quantlib-users] Linking problem with the test suiteDate: Fri, 4 Apr 2008 10:39:58 +0000


Hello, Thank you for your answer. I'm working on Windows, so I kept the .lib files as you said and changed the compiler environment. But I still have the same error... According to what I saw in the FAQ and on Internet, it's related to Dev-C++ and the mingw compiler which is used, but I don't see what to change to fix the problem. Cheers, Elise  

From: toto_from_moon@hotmail.comTo: elise.gourier@hotmail.fr; quantlib-users@lists.sourceforge.netSubject: RE: [Quantlib-users] Linking problem with the test suiteDate: Fri, 4 Apr 2008 10:26:09 +0200

 Hello, You can not change a .lib filename (present in windows environnement) to a .a static library/archive filename, on Unix environnement.I mean, .a filenames must not be present on windows environnement, and .lib names on Unix environnement. Rather than to change filenames (always a bad idea for me), you have to check your compiler options, name of dependent libraries like boost (.lib on windows) here and paths.Cheers,Philippe



From: elise.gourier@hotmail.frTo: quantlib-users@lists.sourceforge.netDate: Wed, 2 Apr 2008 07:52:54 +0000Subject: [Quantlib-users] Linking problem with the test suite


 Hi,I've just installed QuantLib and I have a problem building the test-suite. I have built the examples without any problems. I use Dev-C++, the last version of Boost (1_35, but I have the same error with version 1_34) and QuantLib 0.9.0. At the beginning I got the message "cannot find -lboost_unit_test_framework-mgw-mt" so I changed the name of the library into "libboost_unit_test_framework-mgw-mt.a" (it was "boost_unit_test_framework-mgw34-mt-1_35.lib" before). Now I have the following message:   variable 'vtable for boost::unit_test::unit_test_log_t' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. ...[Linker error] undefined reference to `WinMain@16' ld returned 1 exit status In Project Options>Parameters>Linker I have:../lib/libQuantLib-mgw-0_9_0.a-lboost_unit_test_framework-mgw-mtI spent a lot of time looking on Internet, but did not manage to make it work. I would be very grateful if you could help me.Thanks a lot.Cheers,Elise
 

Plus de 15 millions de français utilisent Windows Live Messenger ! Téléchargez Messenger, c'est gratuit !

Arrêtez le ping pong, et recevez votre réponse dans la seconde ! Windows Live Messenger

Tous vos amis discutent sur Messenger, et vous ? Téléchargez Messenger, c'est gratuit !
_________________________________________________________________
Vous voulez vous faire connaître... Créez gratuitement votre espace sur le web.
http://spaces.live.com
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users