Tag Archives: GSL

How do I use GSL on Visual C++ 2010 express?

How do I use GSL on Visual C++ 2010 express?

This also worked on Visual Studio 2008

Join my FREE newsletter if you like these sort of articles 

This is an important C++ library for all of the C++ QuantCode.com examples.

http://www.quantcode.com/modules/smartfaq/faq.php?faqid=94

My Visual Studio 2010 DLL instructions generated nearly 4983 warnings but it still generates the DLL. I tried Visual Studio 2008, it seems fine with that build.

 

Ensure to follow the dependency instructions to add the build GSL DLLs to your future QuantCode.com C++ example Visual Studio projects

 

Update:
include gsl header files and directory into visual sutdio/vc/include folder. should
get rid of missing header error during compile

 

Also if you get similar linking errors like:

(from url below) also if you  get errors:

Linking…
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_matrix_get referenced in function “void __cdecl
ShowGslMatrix(struct gsl_matrix *,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >)”
(?ShowGslMatrix@@YAXPAUgsl_matrix@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_vector_get referenced in function “void __cdecl
GetNeigbourIndices(struct gsl_vector *,double,int &,int &)”
(?GetNeigbourIndices@@YAXPAUgsl_vector@@NAAH1@Z)
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_vector_set referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_vector_alloc referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_matrix_memcpy referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_matrix_set referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_matrix_alloc referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_set_error_handler referenced in function _wmain
asianadi.obj : error LNK2019: unresolved external symbol
_gsl_ieee_env_setup referenced in function _wmain
C:\Documents and Settings\Administrator\My Documents\Visual Studio
2008\projects\asianadi\Debug\asianadi.exe : fatal error LNK1120: 9
unresolved externals
Build log was saved at “file://c:\Documents and
Settings\Administrator\My Documents\Visual Studio
2008\Projects\asianadi\asianadi\Debug\BuildLog.htm”

do: (from http://www.quantcode.com/modules/smartfaq/faq.php?faqid=94)
1.Launch Visual studio
2.Open your VC++ project.
3.Select menu Project -> properties
4.On the tree display in your project properties dialog box, select
branch for Configuration Properties->VC++ directories
5.On the right side of the dialog, click on the field for “Executable
Directories”. When you choose Edit, a dialog for “Executable
directories” will be launched. Click on button for new line. Paste
these into the field (one at a time):
C:\downloads\gsl-1.8-src\src\gsl\1.8\gsl-1.8\VC8\libgsl\Debug-DLL
C:\downloads\gsl-1.8-src\src\gsl\1.8\gsl-1.8\VC8\libgslcblas\Debug-DLL
6.On the right side of the dialog, click on the field for “Include
Directories”. When you choose Edit, a dialog for “Include directories”
will be launched. Click on button for new line. Paste this into the
field:
C:\downloads\gsl-1.8-src\src\gsl\1.8\gsl-1.8
7.On the right side of the dialog, click on the field for “Library
Directories”. When you choose Edit, a dialog for “Library directories”
will be launched. Click on button for new line. Paste these entries
into the field (one at a time):
C:\downloads\gsl-1.8-src\src\gsl\1.8\gsl-1.8\VC8\libgsl\Debug-DLL
C:\downloads\gsl-1.8-src\src\gsl\1.8\gsl-1.8\VC8\libgslcblas\Debug-DLL
8.In the property pages dialog, select tree item “configuration
properties->Linker->Input
9.On the right hand side details, choose the field “Additional
Dependencies” and append the following entries by clicking the …
button:
libgsl_dll_d.lib
libgslcblas_dll_d.lib
10.In the property pages dialog, select tree item “configuration
properties->C++->Preprocessor
11. Click on edit field for preprocessor definitions. Clikc on
dropdown button. Choose edit. In the “Preprocessor definitions”
dialog, insert the following entry :
GSL_DLL
12. You want want to copy libgslcblas_d.dll and libgsl_d.dll to the
current folder of your new project executable, or else visual studio
will throw an error that the dll is not found

step 12 seems to resolve it by manually moving dlls into project debug
or release folder

during execution, you could still get missing dlls, but could be moved
into Visual Studio project folder one above debug directory.

If you get missing symbols from the GSL for Visual Studio 2008, ensure the project’s properties has by right clicking.

Properties->Configuration Properties->Linker->Input->Additional Dependencies has the lines of:

libgsl_dll_d.lib
libgslcblas_dll_d.lib

 

Also, note for any new Win 32 Console Project, ensure you do not cehck Precompiled Headers Option.

 

 

If you get link error of unresolved external symbol _gsl_rng_mt19937

Ensure to add GSL_DLL as explained above

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Do I rely on GSL for C++ and C# as Matlab surprises with unknown runtime dependency with Builder NE for DotNet

Do I rely on GSL for C++ and C# as Matlab surprises with unknown runtime dependency with Builder NE for DotNet?

As I move into hardcore algorithm development, I am coming across many surprises with the integration  of Matlab and C# with Builder NE toolbox. Despite Mathworks guarantee of 100% compatbility of all Matlab functions, this does appear to be the case with egcitest or jcitest. It needs a dependency MAT file as part of the generated DLL. Despite numerous attempts to include it in the DLL, my C# always got exceptions of the MAT file not being found. It reminds me of all these open sources options I posted earlier:

https://quantlabs.net/blog/2014/02/here-are-my-reasons-why-i-lost-faith-in-open-source-software-like-linux-r-python-java-mongodb-and-nosql/

I don’t want to turn this into another rant but I will say again: I should have listened to the London Quant.
This week has been a disaster as a time waster. Man, develop your own algorithms within C++ or .NET. I should have listened. Damn be damn. Anyhoo….so here we are trying to work with another library like the GSL with .NET. This is my next challenge as I am still working away on this pair trading demo.
So is there really a need for a monster tool like Matlab if I end up writing my own algos?

Crap I do hate delays but I consider it a learning process.  I need a break from all this. TGIF

Join my FREE newsletter to see how implement this pair trading demo

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

I just built open source GSL 64 bit for windows for dotnet c# and c++ for quant trading with HFT

I just built open source GSL 64 bit for windows for dotnet c# and c++ for quant trading with HFT

Learn more about this by joining my FREE newsletter to start your quant trading business

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Are you confused with all these C++ and R math library options of RcppArmadilla, LAPACK, GSL, BLAS, MKL, aaaahhhhh!

Are you confused with all these C++ and R math library options of RcppArmadillo, LAPACK, GSL, BLAS, MKL, Rcppaaaahhhhh!

To add to the confusion of various C++ libraries, there is another options for R users within their C++ code: RCppArmadillo.

Get more info here? http://dirk.eddelbuettel.com/code/rcpp.armadillo.html

Aaaarh! Which way to go? aarrhh!!!

I feel like this with all these option:

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!