Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with include #97

Open
ChrisNabold opened this issue Aug 14, 2019 · 0 comments
Open

Problem with include #97

ChrisNabold opened this issue Aug 14, 2019 · 0 comments

Comments

@ChrisNabold
Copy link

I try to run the sample problem from the gsl manual.
The main file is the same as described there
the gsl library is in the following directory structure:
C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static
/include
/lib
the CMakeLists.txt is as follows:
cmake_minimum_required(VERSION 3.14)
project(EX8 C)

set(CMAKE_C_STANDARD 99)

SET( GSL_INCLUDE_DIR "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/include" )
INCLUDE_DIRECTORIES( "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/include" )
SET( GSL_LIB_BIN "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/lib" )

add_executable(EX8 main.c)
TARGET_LINK_LIBRARIES(EX8 ${GSL_LIB_BIN}/libgsl.a )

The header file gsl/gsl_sf_bessel.h is in the include directory

I always receive the following error message:
CMakeFiles\EX8.dir/objects.a(main.c.obj): In function main': C:/Users/Chris/CLionProjects/EX8/main.c:7: undefined reference to gsl_sf_bessel_J0'

What is wrong? Any help will be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant