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)
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 togsl_sf_bessel_J0'
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