using precompiled external Libraries with DS


#1

Hi again,

Today i wanted to integrate several functions from the Gnu Scientific Library into my current project.
Therefore, i downloaded a precompiled Portation for Windows from GnuWin32.
I sucessfully integraded the installation paths into DS configuration. unfortunately, any attempt to build the project does fail at the point, the linker is called.

H:\Programme\Sierra Wireless\Developer Studio\tools\armeabigcc\4.4.1\bin\arm-none-eabi-g++.exe -Wl,--script,gcc.lkopt -Wl,-( src\prog_config.o src\open_uart2.o src\myalg.o src\main.o src\gpio_interface.o src\generated.o src\debug.o -lgsl -lgw32c -nostartfiles -Lc:/gnuwin32/lib/ -Os -O2 -fshort-enums -fdollars-in-identifiers -ggdb3 -lgsl -lgslcblas -lm -fomit-frame-pointer -mthumb-interwork -mthumb -march=armv5te -msoft-float -mfpu=fpa -mapcs -mno-apcs-stack-check -Wl,-nmagic -Wl,-Map,testgsl.map H:\Programme\Sierra Wireless\Embedded Software\com.wavecom.openat.ide.spm.lib.os.model.6.51.0.201206010944_6.51.0.201206010944\resources\ADL\RVDS_ADL.lib -Wl,-) -otestgsl.axf
src\myalg.o: In function `alg_simple':
C:\workspace\testgsl\[Target]_ARM_EABI_GCC_Debug/..\src/myalg.c:70: undefined reference to `gsl_matrix_view_array'
C:\workspace\testgsl\[Target]_ARM_EABI_GCC_Debug/..\src/myalg.c:71: undefined reference to `gsl_vector_view_array'

i am no expert when it comes to compiler design, but since the included gsl headerfiles are computed without any ranting from the console i asume that the declaration was sucessfull. instead linking to the library may have failed.
as you can see, i did not forget to include -lgsl, telling the linker to make use of the gsl. also, include, lib paths and lib names are set in DS configuration ( c/ c++ general and c/c++ Build, with slashes instead of backslashes like default configuration does).
Therefore i assume the linker commandline to be the the reason for this error. Take a look:

${COMMAND} -Wl,--script,gcc.lkopt  "-Wl,-(" ${INPUTS} ${FLAGS} ${WmOatIdeLibraryFiles} -Wl,-) ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT}

System specs: Windows 7, DS Version 2.2.1, using ARM EABI GCC Toolchain

Any suggestions are welcome!

Have a nice weekend,
D.K


#2

If the library is precompiled for Windows, it’s not going to work for an ARM target…


#3

hi tobias! this is embarassing, but i just didn’t thought about that. thanks for the answer. i’ll go looking for another solution