Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

GSL on NiosII

Hello.

Im trying to implement the gsl in niosII eds. When building the rng-excample on top of http://www.gnu.org/software/gsl/manual/html_node/random-number-distribution-examples.html i get the following messages:

obj/rng_ex.o(.text+0x28): In function `main':

../rng_ex.c:22: undefined reference to `gsl_rng_env_setup'

obj/rng_ex.o(.text+0x2c):../rng_ex.c:24: undefined reference to `gsl_rng_default'

obj/rng_ex.o(.text+0x2c):../rng_ex.c:24: Unable to reach gsl_rng_default (at 0x00000000) from the global pointer (at 0x0401a044) because the offset (-67215428) is out of the allowed range, -32678 to 32767.

I suspect there's a problem with the linking. When manually compiling/linking everything from a shell, with "gcc whatever.c -lgsl -lgslcblas" everything works fine, but i get the following warning:

"/usr/local/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: auto-importing has been activated without --enable-auto-import specified on the command line.

This should work fine unless it involves constant data structures referencing symbols from auto-imported DLLs.Info: resolving _gsl_rng_default by linking to __imp__gsl_rng_default (auto-import)

Info: resolving _gsl_rng_default_seed by linking to __imp__gsl_rng_default_seed (auto-import)"

The binary runs fine though.

Any ideas?
No RepliesBe the first to reply