code::blocks and mingW

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

code::blocks and mingW

Antonio Suriano
Hi everybody

Are there any success stories of compiling Quantlib on Code::Blocks/MinGW? 

It is the first time I use this environment but  I've been successful of building boost 1.41.



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Antonio Suriano

It seems easy indeed. 
You just need to import visual studio 9 projects and follow the wizards. 



2009/12/21 Antonio Suriano <[hidden email]>
Hi everybody

Are there any success stories of compiling Quantlib on Code::Blocks/MinGW? 

It is the first time I use this environment but  I've been successful of building boost 1.41.




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Luigi Ballabio
On Mon, 2009-12-21 at 13:54 +0100, Antonio Suriano wrote:

> It seems easy indeed.
> You just need to import visual studio 9 projects and follow the
> wizards.

So did it work?

Luigi



--

Olmstead's Law:
After all is said and done, a hell of a lot more is said
than done.



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Antonio Suriano
It compiles everything and generates the corresponding object files
but it fails in generating the .a file. 

Linking static library: .\lib\libQuantLib-vc90-mt-gd-0_9_9.a
ar.exe: creating .\lib\libQuantLib-vc90-mt-gd-0_9_9.a
ar.exe: build\vc90\Debug Win32\ql\pricingengines\vanilla\analytic: No such file or directory
Process terminated with status 1 (20 minutes, 40 seconds)
0 errors, 2 warnings

I guess it is only a mistake in sending the correct list of object files to the linker.



2009/12/21 Luigi Ballabio <[hidden email]>
On Mon, 2009-12-21 at 13:54 +0100, Antonio Suriano wrote:

> It seems easy indeed.
> You just need to import visual studio 9 projects and follow the
> wizards.

So did it work?

Luigi



--

Olmstead's Law:
After all is said and done, a hell of a lot more is said
than done.




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Julien Genest
Hi Antonio, Luigi, this is a known issue of Code::Blocks under Windows
(up to vista to my experience) for "huge" projects, .
The command line in windows is limited in size, and the last linking
command is cut because it is longer than maximum command length.
The solution for now is to use an external makefile with Code::Blocks,
where the static linkage must be done in various steps to limit the size
of each command.
This is how I did it before i switched to VC++ for other reasons (Cuda
trials, SDK uses Visual):
first use Dev-Cpp as it creates a Makefile.win file for MingW, or use a
plugin for Code::Blocks to export to a makefile (though this plugin is
hard to find)
then decompose the rule (located at the beginning of the makefile
created by Dev-Cpp)

$(BIN): $(LINKOBJ)
    ar r $(BIN) $(LINKOBJ)
    ranlib $(BIN)

in something like:

$(BIN): $(LINKOBJ)
    ar r $(BIN) $(LINKOBJ1)
    ar r $(BIN) $(LINKOBJ2)
    ar r $(BIN) $(LINKOBJ3)
    ar r $(BIN) $(LINKOBJ4)
    ranlib $(BIN)

where the LINKOBJ# are slices of the LINKOBJ list you have to declare at
the beginning of the makefile, if I remember well 4 slices are enough to
get each part to an acceptable size for windows for the last version of
QuantLib.
This works as the 'r' option of ar.exe utility adds files to the static
library viewed as an archive.

Then set your Code:: Blocks project to use this makefile, this is
possible somewhere in the properties, or directly use the make command
with this makefile (mingw32-make -f Makefile.win)

Hope this helps, until someone decide to (improve Windows or) patch
Code::Blocks to automatically decompose long command lines under Windows...
Maybe their is a better way, if someone knew it I'd be glad to hear it.

Julien (PS: due to a bug I may have sent this response twice, I
apologize if this is the case)


Antonio Suriano a écrit :

> It compiles everything and generates the corresponding object files
> but it fails in generating the .a file.
>
> Linking static library: .\lib\libQuantLib-vc90-mt-gd-0_9_9.a
> ar.exe: creating .\lib\libQuantLib-vc90-mt-gd-0_9_9.a
> ar.exe: build\vc90\Debug Win32\ql\pricingengines\vanilla\analytic: No
> such file or directory
> Process terminated with status 1 (20 minutes, 40 seconds)
> 0 errors, 2 warnings
>
> I guess it is only a mistake in sending the correct list of object
> files to the linker.
>
>
>
> 2009/12/21 Luigi Ballabio <[hidden email]
> <mailto:[hidden email]>>
>
>     On Mon, 2009-12-21 at 13:54 +0100, Antonio Suriano wrote:
>
>     > It seems easy indeed.
>     > You just need to import visual studio 9 projects and follow the
>     > wizards.
>
>     So did it work?
>
>     Luigi
>
>
>
>     --
>
>     Olmstead's Law:
>     After all is said and done, a hell of a lot more is said
>     than done.
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> ------------------------------------------------------------------------
>
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.426 / Virus Database: 270.14.114/2575 - Release Date: 12/19/09 08:33:00
>
>  





------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Antonio Suriano
Ok

I've simply splitted the command line into six parts in an ordinary .bat file. And it works fine. 
Is the lib so large? about 110 megabytes the debug and 50 the release version. 









------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Luigi Ballabio
On Tue, 2009-12-22 at 10:27 +0100, Antonio Suriano wrote:
> Is the lib so large? about 110 megabytes the debug and 50 the release
> version.

Yes, it sounds about right.

Luigi



--

An ideal world is left as an exercise to the reader.
-- Paul Graham



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: code::blocks and mingW

Antonio Suriano
I was too optimistic. 
Even if the library is generated now, I have a lot of problem in linking ecamples  (I'm using gcc 4.4.0 for mingW) because of vtables.

an example of errors
C:/quantlib/QuantLib-0.9.9/ql/models/marketmodels/marketmodel.hpp:41: undefined reference to `vtable for QuantLib::MarketModel'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib17MultiStepSwaptionE[vtable for QuantLib::MultiStepSwaption]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib17MultiStepSwaptionE[vtable for QuantLib::MultiStepSwaption]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib13MultiStepSwapE[vtable for QuantLib::MultiStepSwap]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib13MultiStepSwapE[vtable for QuantLib::MultiStepSwap]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib16MultiStepRatchetE[vtable for QuantLib::MultiStepRatchet]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib16MultiStepRatchetE[vtable for QuantLib::MultiStepRatchet]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib30MultiStepPeriodCapletSwaptionsE[vtable for QuantLib::MultiStepPeriodCapletSwaptions]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib30MultiStepPeriodCapletSwaptionsE[vtable for QuantLib::MultiStepPeriodCapletSwaptions]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib19MultiStepOptionletsE[vtable for QuantLib::MultiStepOptionlets]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib19MultiStepOptionletsE[vtable for QuantLib::MultiStepOptionlets]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib16MultiStepNothingE[vtable for QuantLib::MultiStepNothing]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib16MultiStepNothingE[vtable for QuantLib::MultiStepNothing]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib17MultiStepForwardsE[vtable for QuantLib::MultiStepForwards]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib17MultiStepForwardsE[vtable for QuantLib::MultiStepForwards]+0x14): undefined reference to `QuantLib::MultiProductMultiStep::evolution() const'
build\vc71\Debug Win32\swapvaluation.o:swapvaluation.cpp:(.rdata$_ZTVN8QuantLib28MultiStepCoterminalSwaptionsE[vtable for QuantLib::MultiStepCoterminalSwaptions]+0x10): undefined reference to `QuantLib::MultiProductMultiStep::suggestedNumeraires() const'





2009/12/22 Luigi Ballabio <[hidden email]>
On Tue, 2009-12-22 at 10:27 +0100, Antonio Suriano wrote:
> Is the lib so large? about 110 megabytes the debug and 50 the release
> version.

Yes, it sounds about right.

Luigi



--

An ideal world is left as an exercise to the reader.
-- Paul Graham




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users