Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed GNU scientific library (http://www.gnu.org/software/gsl/) which is located in /home/usr/gsl-1.9 and installed statistical programme in /home/usr/statprog

when I tried to compile it, this happens:

$ cd home/usr/statprog 
$ make
gcc -O3 -Wall -Wshadow -pedantic D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -c -o mlRho.o mlRho.c
gcc: error: D_GNU_SOURCE: No such file or directory
make: *** [mlRho.o] Error 1

It says no such file or directory. How to link GNU library to this statprog?

share|improve this question
add comment

1 Answer

There's a dash (-) missing in the command before D_GNU_SOURCE. Passing -D_GNU_SOURCE to the compiler is equivalent to adding #define _GNU_SOURCE at the start of the c file.

It looks like the Makefile is corrupted somehow. Try

find . -type f -exec grep -lZ D_GNU_SOURCE {} + |
  xargs -r0 perl -pi -e 's/-*D_GNU_SOURCE/-D_GNU_SOURCE/g'

and run make again. However it's likely that something more fundamental is wrong here for that error to have crept in in the first place.

share|improve this answer
    
Still it shows error. How to link GNU library to this statprog manually? –  jack Oct 1 '12 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.