none
Using GSL

    Question

  • Hello:

     

    I downloaded GSL 1.13 and created a win32 project in MSVS2008 with modifications to its properties.  But when I try to #include the header files for my libraries in GSL, I get the error:

    '#include <gsl/gsl_blas.h>': skipped when looking for precompiled header use Add directive to 'stdafx.h' or rebuild precompiled header

    When compiling that modified win32 project, my header #include<iostream> also result in the same error:

    skipped when looking for precompiled header use Add directive to 'stdafx.h' or rebuild precompiled header

     

    When I create a brand new empty project without the modifications to point to my GSL directories, the compiler at least recognizes #include<iostream>. 

    How are we suppose to link our projects to the GSL and then call them in our main.cpp?  Does anyone have sample code to test that as well?  Thank you!  My OS is WinXP.

     

     

    Friday, March 26, 2010 7:19 PM

Answers

  • Remove the quotation marks. That's telling the linker that there is a single file named "cblas_d.lib gsl_d.lib" rather than two separate files named "cblas_d.lib" and "gsl_d.lib".
    • Marked as answer by AMpractice Saturday, March 27, 2010 7:37 PM
    Friday, March 26, 2010 8:20 PM
  • Great, that works now.  After successfullly compiling w. no error and no warnings, I ran the program.  But I just get a blank window that pops up, even though I have a cout<< statement.  The warnings were

     

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MSNChatHook.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\CryptoAPI.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\ShowErrMsg.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.

     

     

    • Marked as answer by AMpractice Friday, March 26, 2010 10:02 PM
    Friday, March 26, 2010 8:33 PM

All replies

  • How about just doing what the error suggests and add #include "stdafx.h" to the top of your source file. If you don't want to do this, then don't enable precompiled headers.

    Friday, March 26, 2010 7:35 PM
  • Yes, thanks.  I moved it to the top and those errors went away.  There's only one error left and it's

     

    1>Linking...
    1>LINK : fatal error LNK1104: cannot open file 'cblas_d.lib gsl_d.lib'

     

    Not sure why it is doing that bc I just

    Project>Properties>Debug Configuration>Configuration Properities>C/C++>Linker>Input>Additional Dependencies
    "cblas_d.lib gsl_d.lib"
    >Apply

    Friday, March 26, 2010 7:43 PM
  • Yep, they sit in the gsl\lib folder in the binaries.  Its full directory path is written in Project>Properties>Debug Configuration>Configuration Properties>C/C++>Linker>General>Additional Library Directories .  And I checked that

    cblas_d and gsl_d files arein that directory path.  They are Object File Library.  So "cblas_d.lib gsl_d.lib" with a space in between the two strings and in double quotation marks are in Linker>Input>Additional Dependencies

    fatal error LNK1104?

    Friday, March 26, 2010 7:54 PM
  • Remove the quotation marks. That's telling the linker that there is a single file named "cblas_d.lib gsl_d.lib" rather than two separate files named "cblas_d.lib" and "gsl_d.lib".
    • Marked as answer by AMpractice Saturday, March 27, 2010 7:37 PM
    Friday, March 26, 2010 8:20 PM
  • Great, that works now.  After successfullly compiling w. no error and no warnings, I ran the program.  But I just get a blank window that pops up, even though I have a cout<< statement.  The warnings were

     

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MSNChatHook.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\CryptoAPI.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\ShowErrMsg.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.

     

     

    • Marked as answer by AMpractice Friday, March 26, 2010 10:02 PM
    Friday, March 26, 2010 8:33 PM
  • Great, that works now.  After successfullly compiling w. no error and no warnings, I ran the program.  But I just get a blank window that pops up, even though I have a cout<< statement.  The warnings were

     

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MSNChatHook.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\CryptoAPI.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\ShowErrMsg.dll', Binary was not built with debug information.

    'GSL113.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.

     

     

    Friday, March 26, 2010 8:33 PM
  • That's an entirely different question, and one which is impossible to answer without seeing your code. Your original question appears to be answered, so please mark this thread as answered and start a new one.
    Friday, March 26, 2010 9:22 PM
  • The purpose of marking an answer is so that people who have a similar problem as you can find this thread later and read how to solve the problem. Is the post that you marked as an answer going to help those people? In my opinion, if these forums helped you, you should use them properly to help other people as well.
    Saturday, March 27, 2010 7:33 PM