I am trying to install a big integer library onto DevC++. The library has to have the feature
BigInt a;
vector< BigInt > b;
int a1, a2;
BigInt c = a1 * a2;
etc...
One that I found was NTL http://www.shoup.net/ntl/ but I am having trouble installing it properly. Does anyone know how I can install this library or know of other libraries that can be installed easier etc?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What does "I am having trouble installing it properly" mean?
What have you been doing to install it?
Are you trying to build it?
Are you having troubles using it?
Do you know how to link libraries and such?
My the way, have you looked into GMP, it is available through devpacks.org server, so you can get it, ans install it via webupdate, no fuss, no muss.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-06-20
The library is supplied as source code, The site (and the download) include instructions for building the static library from the source using MSVC++ (http://shoup.net/ntl/doc/tour-win.html). The steps in Dev-C++ are very similar.
I suggest that you start with the static library project template (File|New|Project|Static Library, select C++ as the default language, name the project libntl it will create a libntl.a file conforming to the GNU naming convention. The under Project|Add to project add the sources \src subfolder. In Project|Project options|Directories|Include directories, add the library's \include subfolder path.
When you build this yo will creat a file libntl.a that you can link to your own executable projects or the examples provided with the library. Typically you will create a console mode application using the console app project template. Add the example source (e.g. \tests\quicktest.cpp), and then add the library via Project|Project options|Parameters|Add library or object. And then add the include file path via Project|Project options|Directories|Include directories as before.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to build it following the instructions given for MSVC++. It produced an ntl.a file. I tried to add that to the library path and included all teh h.files appropriately. I tried running the accompanied test file and it spat out tonnes of 'linker error's at me... so I am guessing it was not built properly...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I encourage you with respect to linker issues to check out the section in the thread titled "Please Read Before Posting a Question" on the compile log, including headers, and linking libraries. It goes through a lot of the mechanics.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-06-21
>> ... so I am guessing it was not built properly
No, more likely you simply did not set the linker options correctly - you evidently did not follow my instructions! Adding the path to the library search paths is insufficient (and in fact unnecessary if you carefully follow my directions).
What adding a library path does (the -L linker option you will observe in the Compile Log) is set a path where it will search for libraries specified by subsequent -l (lowercase-L) options. This is why I told you to name the project "libntl" - to create a libntl.a file - because when you specify -lntl, the linker searches for libntl.a. However if you explicitly specify the path and library name, you do not need to to this at all - this is why I directed you to use the "Add library or object" button to specify the library.
Also you need to be aware that you can set options under Tools|Compiler options or Project|Project options, for generic or project specific control. Always check the Compile Log to determine whether the options you have set are being correctly applied.
I suggest that you follow my directions carefully and exactly rather than going your own way - at least for the time-being; you may be right but this way it makes it easier to fix any problems you may encounter.
Also we can do nothing much to analyse any problems you encounter if you don't post the Compile Log in its entirity.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found by accident another way to link to a library. Goto the compiler or project options (I forget which). In the linker box type the path and filename only. EG: C:/.../library.a
That should work without using "-L"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-07-12
That is not really "another way", it has the same effect as the "Project|Project options|Parameters|Add library or object" method I already suggested.
The "Add library or object" buttom is just a convenience to avoid entering the path manually as you have suggested. The path is entered into the linker options just the same.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to use the NTL and GMP libraries but couldn;t compile them properly, so I decided to use DevC++. I am new to using DevC++ and am a little confused about the DevPaks...
I installed both libgmp.a and libntl.a using webupdate. I tried to compile the project by including the libntl.a library in the 'parameters' and downloaded the sourcecode for NTL and dumped the NTL directory under include. it generated linker errors and doesn;t like the fact that iostream.h is used so rejects the operators << and >>.
Maybe I just don't know how to actually use the devpaks correctly, so if you can point me to the right directing, that till be great!
Thanks
include <cstdlib>
include <iostream>
include "NTL/ZZ.h"
using namespace std;
using namespace NTL;
int main() {
ZZ a, b, c;
cin >> b;
c = (a+1)*(b+1);
cout << c << "\n";
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-06-22
Most DevPaks also install a template project that sets all the parameters correctly for you. Look under File|New|New Project.
We cannot help with with build errors from just a 'description'! Post the compile log.
You described using an NTL devpak and downloading the source - you generally need to do one or the other, not both - it is not clear from your description what you have done.
It is also not clear whether or not you are the initiator if this thread. If you are not the anonymous starter of the thread, you should not post you own problems to this thread - not at least until the OP has had his issue sucessfully resolved.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Maybe I just don't know how to actually use the devpaks correctly"
There's nothing to it, go to Tools:Check for Updates and Packages, select the ones you want, and EVERYTHIN is handled for you. Nothing to put anywhere.
And PLEASE, always post your Basic 3.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
i m trying to install a library called QuantLib on DevCpp.when i compiled this library i get 1 error in total errors and this is error message in compile log screen:
i don t know if quantLib is installed or not;
please any suggestion: taiko_vic@yahoo.fr
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-07-10
You should probably start this on a new thread - especially if you did not start this thread in the first case.
You are advised never to post your e-mail address on a public forum unless you want to end up on every spam list on the planet. Moreover you should never ask for responses by e-mail, all answers are for the benefit of the user community as a whole. If you create a sourceforge log-in you can be contacted anonymously for the protection of all parties.
There are no errors in that log. It looks like a normal library build to me. However, building teh library is not teh same as installing a library. In fact libraries do not have to be 'installed' as such, you just have to point the linker at their location when you choose to use them. You should find the file QuantLib.a in C:\msys\1.0\home\QuantLib-0.3.12\lib\
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I am trying to install a big integer library onto DevC++. The library has to have the feature
BigInt a;
vector< BigInt > b;
int a1, a2;
BigInt c = a1 * a2;
etc...
One that I found was NTL http://www.shoup.net/ntl/ but I am having trouble installing it properly. Does anyone know how I can install this library or know of other libraries that can be installed easier etc?
Thanks
What does "I am having trouble installing it properly" mean?
What have you been doing to install it?
Are you trying to build it?
Are you having troubles using it?
Do you know how to link libraries and such?
My the way, have you looked into GMP, it is available through devpacks.org server, so you can get it, ans install it via webupdate, no fuss, no muss.
The library is supplied as source code, The site (and the download) include instructions for building the static library from the source using MSVC++ (http://shoup.net/ntl/doc/tour-win.html). The steps in Dev-C++ are very similar.
I suggest that you start with the static library project template (File|New|Project|Static Library, select C++ as the default language, name the project libntl it will create a libntl.a file conforming to the GNU naming convention. The under Project|Add to project add the sources \src subfolder. In Project|Project options|Directories|Include directories, add the library's \include subfolder path.
When you build this yo will creat a file libntl.a that you can link to your own executable projects or the examples provided with the library. Typically you will create a console mode application using the console app project template. Add the example source (e.g. \tests\quicktest.cpp), and then add the library via Project|Project options|Parameters|Add library or object. And then add the include file path via Project|Project options|Directories|Include directories as before.
Clifford
hey people thanks for the help.
I tried to build it following the instructions given for MSVC++. It produced an ntl.a file. I tried to add that to the library path and included all teh h.files appropriately. I tried running the accompanied test file and it spat out tonnes of 'linker error's at me... so I am guessing it was not built properly...
BTW - the devpacks.org just gave me a load of computing courses... and i have no idea what webundate it...
To run WebUpdate, just go in Dev to:
Tools:Check For Updates/Packages
I encourage you with respect to linker issues to check out the section in the thread titled "Please Read Before Posting a Question" on the compile log, including headers, and linking libraries. It goes through a lot of the mechanics.
Wayne
>> ... so I am guessing it was not built properly
No, more likely you simply did not set the linker options correctly - you evidently did not follow my instructions! Adding the path to the library search paths is insufficient (and in fact unnecessary if you carefully follow my directions).
What adding a library path does (the -L linker option you will observe in the Compile Log) is set a path where it will search for libraries specified by subsequent -l (lowercase-L) options. This is why I told you to name the project "libntl" - to create a libntl.a file - because when you specify -lntl, the linker searches for libntl.a. However if you explicitly specify the path and library name, you do not need to to this at all - this is why I directed you to use the "Add library or object" button to specify the library.
Also you need to be aware that you can set options under Tools|Compiler options or Project|Project options, for generic or project specific control. Always check the Compile Log to determine whether the options you have set are being correctly applied.
I suggest that you follow my directions carefully and exactly rather than going your own way - at least for the time-being; you may be right but this way it makes it easier to fix any problems you may encounter.
Also we can do nothing much to analyse any problems you encounter if you don't post the Compile Log in its entirity.
Clifford
I found by accident another way to link to a library. Goto the compiler or project options (I forget which). In the linker box type the path and filename only. EG: C:/.../library.a
That should work without using "-L"
That is not really "another way", it has the same effect as the "Project|Project options|Parameters|Add library or object" method I already suggested.
The "Add library or object" buttom is just a convenience to avoid entering the path manually as you have suggested. The path is entered into the linker options just the same.
Clifford
Hi there.
I am trying to use the NTL and GMP libraries but couldn;t compile them properly, so I decided to use DevC++. I am new to using DevC++ and am a little confused about the DevPaks...
I installed both libgmp.a and libntl.a using webupdate. I tried to compile the project by including the libntl.a library in the 'parameters' and downloaded the sourcecode for NTL and dumped the NTL directory under include. it generated linker errors and doesn;t like the fact that iostream.h is used so rejects the operators << and >>.
Maybe I just don't know how to actually use the devpaks correctly, so if you can point me to the right directing, that till be great!
Thanks
include <cstdlib>
include <iostream>
include "NTL/ZZ.h"
using namespace std;
using namespace NTL;
int main() {
ZZ a, b, c;
cin >> b;
c = (a+1)*(b+1);
cout << c << "\n";
}
Most DevPaks also install a template project that sets all the parameters correctly for you. Look under File|New|New Project.
We cannot help with with build errors from just a 'description'! Post the compile log.
You described using an NTL devpak and downloading the source - you generally need to do one or the other, not both - it is not clear from your description what you have done.
It is also not clear whether or not you are the initiator if this thread. If you are not the anonymous starter of the thread, you should not post you own problems to this thread - not at least until the OP has had his issue sucessfully resolved.
Clifford
"Maybe I just don't know how to actually use the devpaks correctly"
There's nothing to it, go to Tools:Check for Updates and Packages, select the ones you want, and EVERYTHIN is handled for you. Nothing to put anywhere.
And PLEASE, always post your Basic 3.
Wayne
hi,
i m trying to install a library called QuantLib on DevCpp.when i compiled this library i get 1 error in total errors and this is error message in compile log screen:
Compiler: Default compiler
Building Makefile: "C:\msys\1.0\home\QuantLib-0.3.12\Makefile.win"
Executing make...
make.exe -f "C:\msys\1.0\home\QuantLib-0.3.12\Makefile.win" all
windres.exe -i QuantLib_private.rc --input-format=rc -o ./build/mingw/QuantLib_private.res -O coff
ar r lib/QuantLib.a ./build/mingw/voltermstructure.o ./build/mingw/calendar.o ./build/mingw/currency.o ./build/mingw/date.o ./build/mingw/discretizedasset.o ./build/mingw/errors.o ./build/mingw/exchangerate.o ./build/mingw/exercise.o ./build/mingw/interestrate.o ./build/mingw/money.o ./build/mingw/schedule.o ./build/mingw/stochasticprocess.o ./build/mingw/zurich.o ./build/mingw/beijing.o ./build/mingw/budapest.o ./build/mingw/copenhagen.o ./build/mingw/germany.o ./build/mingw/helsinki.o ./build/mingw/hongkong.o ./build/mingw/italy.o ./build/mingw/johannesburg.o ./build/mingw/jointcalendar.o ./build/mingw/oslo.o ./build/mingw/riyadh.o ./build/mingw/seoul.o ./build/mingw/singapore.o ./build/mingw/stockholm.o ./build/mingw/sydney.o ./build/mingw/taiwan.o ./build/mingw/target.o ./build/mingw/tokyo.o ./build/mingw/toronto.o ./build/mingw/unitedkingdom.o ./build/mingw/unitedstates.o ./build/mingw/warsaw.o ./build/mingw/wellington.o ./build/mingw/timebasket.o ./build/mingw/basispointsensitivity.o ./build/mingw/cashflowvectors.o ./build/mingw/inarrearindexedcoupon.o ./build/mingw/parcoupon.o ./build/mingw/shortfloatingcoupon.o ./build/mingw/exchangeratemanager.o ./build/mingw/thirty360.o ./build/mingw/actualactual.o ./build/mingw/simpledaycounter.o ./build/mingw/boundarycondition.o ./build/mingw/bsmoperator.o ./build/mingw/tridiagonaloperator.o ./build/mingw/indexmanager.o ./build/mingw/xibor.o ./build/mingw/vanillaoption.o ./build/mingw/asianoption.o ./build/mingw/barrieroption.o ./build/mingw/basketoption.o ./build/mingw/capfloor.o ./build/mingw/cliquetoption.o ./build/mingw/dividendvanillaoption.o ./build/mingw/europeanoption.o ./build/mingw/forwardvanillaoption.o ./build/mingw/multiassetoption.o ./build/mingw/oneassetoption.o ./build/mingw/oneassetstrikedoption.o ./build/mingw/quantoforwardvanillaoption.o ./build/mingw/quantovanillaoption.o ./build/mingw/simpleswap.o ./build/mingw/stock.o ./build/mingw/swap.o ./build/mingw/swaption.o ./build/mingw/trinomialtree.o ./build/mingw/binomialtree.o ./build/mingw/symmetricschurdecomposition.o ./build/mingw/beta.o ./build/mingw/bivariatenormaldistribution.o ./build/mingw/chisquaredistribution.o ./build/mingw/choleskydecomposition.o ./build/mingw/discrepancystatistics.o ./build/mingw/errorfunction.o ./build/mingw/factorial.o ./build/mingw/gammadistribution.o ./build/mingw/generalstatistics.o ./build/mingw/incompletegamma.o ./build/mingw/incrementalstatistics.o ./build/mingw/normaldistribution.o ./build/mingw/primenumbers.o ./build/mingw/pseudosqrt.o ./build/mingw/rounding.o ./build/mingw/svd.o ./build/mingw/getcovariance.o ./build/mingw/steepestdescent.o ./build/mingw/armijo.o ./build/mingw/conjugategradient.o ./build/mingw/simplex.o ./build/mingw/singleassetoption.o ./build/mingw/discretegeometricaso.o ./build/mingw/mccliquetoption.o ./build/mingw/mcdiscretearithmeticaso.o ./build/mingw/mceverest.o ./build/mingw/mchimalaya.o ./build/mingw/mcmaxbasket.o ./build/mingw/mcpagoda.o ./build/mingw/mcperformanceoption.o ./build/mingw/blackformula.o ./build/mingw/americanpayoffatexpiry.o ./build/mingw/americanpayoffathit.o ./build/mingw/mc_discr_geom_av_price.o ./build/mingw/analytic_cont_geom_av_price.o ./build/mingw/analytic_discr_geom_av_price.o ./build/mingw/mc_discr_arith_av_price.o ./build/mingw/mcbarrierengine.o ./build/mingw/analyticbarrierengine.o ./build/mingw/stulzengine.o ./build/mingw/mcamericanbasketengine.o ./build/mingw/mcbasketengine.o ./build/mingw/treecapfloorengine.o ./build/mingw/analyticcapfloorengine.o ./build/mingw/blackcapfloorengine.o ./build/mingw/discretizedcapfloor.o ./build/mingw/analyticperformanceengine.o ./build/mingw/analyticcliquetengine.o ./build/mingw/treeswaptionengine.o ./build/mingw/blackswaptionengine.o ./build/mingw/discretizedswaption.o ./build/mingw/jamshidianswaptionengine.o ./build/mingw/mcdigitalengine.o ./build/mingw/analyticdigitalamericanengine.o ./build/mingw/analyticdividendeuropeanengine.o ./build/mingw/analyticeuropeanengine.o ./build/mingw/baroneadesiwhaleyengine.o ./build/mingw/bjerksundstenslandengine.o ./build/mingw/discretizedvanillaoption.o ./build/mingw/integralengine.o ./build/mingw/jumpdiffusionengine.o ./build/mingw/juquadraticengine.o ./build/mingw/sobolrsg.o ./build/mingw/faurersg.o ./build/mingw/haltonrsg.o ./build/mingw/knuthuniformrng.o ./build/mingw/lecuyeruniformrng.o ./build/mingw/mt19937uniformrng.o ./build/mingw/seedgenerator.o ./build/mingw/primitivepolynomials.o ./build/mingw/twofactormodel.o ./build/mingw/calibrationhelper.o ./build/mingw/model.o ./build/mingw/onefactormodel.o ./build/mingw/swaptionhelper.o ./build/mingw/caphelper.o ./build/mingw/vasicek.o ./build/mingw/blackkarasinski.o ./build/mingw/coxingersollross.o ./build/mingw/extendedcoxingersollross.o ./build/mingw/hullwhite.o ./build/mingw/g2.o ./build/mingw/affinetermstructure.o ./build/mingw/compoundforward.o ./build/mingw/extendeddiscountcurve.o ./build/mingw/piecewiseflatforward.o ./build/mingw/ratehelpers.o ./build/mingw/localvolsurface.o ./build/mingw/blackvariancecurve.o ./build/mingw/blackvariancesurface.o ./build/mingw/bond.o ./build/mingw/fixedcouponbond.o ./build/mingw/bratislava.o ./build/mingw/prague.o ./build/mingw/floatingratebond.o ./build/mingw/zerocouponbond.o ./build/mingw/greeks.o ./build/mingw/fddividendengine.o ./build/mingw/fdeuropeanengine.o ./build/mingw/fdmultiperiodengine.o ./build/mingw/fdstepconditionengine.o ./build/mingw/fdvanillaengine.o ./build/mingw/blackscholesprocess.o ./build/mingw/geometricbrownianprocess.o ./build/mingw/merton76process.o ./build/mingw/ornsteinuhlenbeckprocess.o ./build/mingw/squarerootprocess.o ./build/mingw/dataformatters.o ./build/mingw/dataparsers.o ./build/mingw/tracing.o ./build/mingw/timegrid.o ./build/mingw/gaussianorthogonalpolynomial.o ./build/mingw/gaussianquadratures.o ./build/mingw/tqreigendecomposition.o ./build/mingw/eulerdiscretization.o ./build/mingw/hestonprocess.o ./build/mingw/stochasticprocessarray.o ./build/mingw/hestonmodel.o ./build/mingw/hestonmodelhelper.o ./build/mingw/analytichestonengine.o ./build/mingw/analysis.o ./build/mingw/istanbul.o ./build/mingw/libor.o ./build/mingw/batesmodel.o ./build/mingw/batesengine.o ./build/mingw/bombay.o ./build/mingw/bondhelpers.o ./build/mingw/strings.o ./build/mingw/sampledcurve.o ./build/mingw/argentina.o ./build/mingw/brazil.o ./build/mingw/iceland.o ./build/mingw/indonesia.o ./build/mingw/mexico.o ./build/mingw/ukraine.o ./build/mingw/convertiblebond.o ./build/mingw/levenbergmarquardt.o ./build/mingw/lmdif.o ./build/mingw/lfmswaptionengine.o ./build/mingw/discretizedconvertible.o ./build/mingw/lfmcovarparam.o ./build/mingw/lfmhullwhiteparam.o ./build/mingw/lfmprocess.o ./build/mingw/lfmcovarproxy.o ./build/mingw/liborforwardmodel.o ./build/mingw/lmcorrmodel.o ./build/mingw/lmexpcorrmodel.o ./build/mingw/lmfixedvolmodel.o ./build/mingw/lmlinexpvolmodel.o ./build/mingw/lmvolmodel.o ./build/mingw/QuantLib_private.res
ar: creating lib/QuantLib.a
ranlib lib/QuantLib.a
Execution terminated
===========================================
i don t know if quantLib is installed or not;
please any suggestion: taiko_vic@yahoo.fr
You should probably start this on a new thread - especially if you did not start this thread in the first case.
You are advised never to post your e-mail address on a public forum unless you want to end up on every spam list on the planet. Moreover you should never ask for responses by e-mail, all answers are for the benefit of the user community as a whole. If you create a sourceforge log-in you can be contacted anonymously for the protection of all parties.
There are no errors in that log. It looks like a normal library build to me. However, building teh library is not teh same as installing a library. In fact libraries do not have to be 'installed' as such, you just have to point the linker at their location when you choose to use them. You should find the file QuantLib.a in C:\msys\1.0\home\QuantLib-0.3.12\lib\
Clifford