[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] GSL Link error on VC9

From: jerome . hummel
Subject: Re: [Help-gsl] GSL Link error on VC9
Date: Wed, 20 Feb 2013 11:01:08 +0100 (CET)


Many thanks for your input, this is much appreciated.

I finally found a way to go forward on my side, I hope it can help others:

I found a VC9 build solution of GSL here:

I downloaded the content and pasted it under the root directory of GSL.
Note that this build solution relates to GSL1.12 which I downloaded from

Information on how to build can be found here:

Note that I was still unable to build the dlls.
But the static libary built fine and I used them in my VC9 C++ project.
Using those libs I was able to finally link. My executable will be much larger 
but this is fine I can go forward.

If some of the users are interested by a VC10 build find a useful link here:

I hope this will help some of you as I spent quiet some time solving this!


----- Mail original -----
> De: "Clinton Chee" <address@hidden>
> À: "address@hidden" <address@hidden>
> Envoyé: Mardi 19 Février 2013 23:22:12
> Objet: Re: [Help-gsl] GSL Link error on VC9
> Hi Jerome,
> There  are some notes in
> Which may or may not be helpful to you.
> The notes above are for building GSL with VS C/C++. It did build and
> was able to used by another project.
> However, the process above may be a bit messy and it is the first
> attempt. Another attempt with GSL and Intel C/C++ has a neater
> approach and is described in
> The "error LNK2019:" is a VS error message and is usually because the
> project cannot see the variables (which could be from another
> project / library).  For an example see:
> And search (Ctrl-F) for LNK2019 on that webpage.
> You can use a tool call Dependency Walker (get the right 32 or 64 bit
> version) and check if your compiled GSL dll exposes the variable it
> complains about. If check if the variable is exposed, just look at
> the middle panel in dependency walker where it lists all the
> (exposed) variables of the dll.
> In the GSL / Intel C/C++, to avoid the LNK:2019, the variables were
> explicitly exposed via a definition file.
> The following is taken from
> Also more importantly, see "11. Interoperability - Using DEF file
> method for exporting variables and functions." In the link above.
> --------------------------------------------------
> 14. This section describes how to build the GSL-provided tests using
> VS2010 and the Intel C compiler.
> The source file test.c is physically located at, eg:
>       GSL_staging/gslIntelSoln/<proj>/sys/test.c
> Creating Test projects for each package specifically:
> - In the solution gslIntelSoln,  Add New Project - Visual C++ - Win32
> - Win32 Console Application - "test_<gsl package>" -
>   choose Console Application and Empty Project.
> - Transform this to Intel C/C++ project by: right-click project -
> Intel C++ Composer XE 2011 - Use Intel C++
> - In the test project, eg gslIntelSoln/test_block in Solution
> Explorer, right click on Source Files - Add Existing File.
> - Choose the files to be tested by navigating to the
> gslIntelSoln/<proj>/block/ directory and select the test files such
> as test.c or others if applicable.
> - Fill in for ALL CONFIGURATION, ALL PLATFORMS the following
> properties for the test project:
>   C/C++ - General - Additional Include Directories -
>   $(SolutionDir)gslIntel
>   C/C++ - Preprocessor - WIN32, ...., GSL_DLL
>   Linker - General - Additional Library Directories - $(OutputPath)
>   Linker - Input - Additional Dependencies  - gslIntel.lib
> - Compile and note the "error LNK2019" messages. If some variables or
> functons are not exposed, then edit the file
>       gslIntel/gslIntel.def
>   to add the functions and variables and recompile gslIntel and test
>   projects.
> - For the following test projects: test_eigen, test_linalg,
> test_wavelet, test_multifit, test_multimin,
>   they use MKL and this can be configured by:
>      - Project Propertie - Configuration Properties - Intel
>      Performance Libraries - Intel Math Kernel Libraries - Use MKL -
>      Parallel.
> - For specfun test project, there is no test.c. Instead there are
> numerous test_sf* which must be included in test_specfun project.
> --------------------------------------------------
> C. Chee
> ************** IMPORTANT MESSAGE *****************************
> This e-mail message is intended only for the addressee(s) and
> contains information which may be
> confidential.
> If you are not the intended recipient please advise the sender by
> return email, do not use or
> disclose the contents, and delete the message and any attachments
> from your system. Unless
> specifically indicated, this email does not constitute formal advice
> or commitment by the sender
> or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
> subsidiaries.
> We can be contacted through our web site:
> If you no longer wish to receive commercial electronic messages from
> us, please reply to this
> e-mail by typing Unsubscribe in the subject line.
> **************************************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]