help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Problems with compiling for OSX 10.3


From: Elspeth Nickle and Ron Teather
Subject: [Help-gsl] Problems with compiling for OSX 10.3
Date: Fri, 21 May 2004 23:07:17 +0100

I am trying to compile the example program for generating all the combinations of the elements in a set using the GSL library. I am using OSX 10.3. I cannot figure out how to get the gsl libraries to link to my test program.

I have compiled the GSL library and it is installed in /usr/local/lib as libgslcblas.la and libgslcblas.a.

When I run the following command to compile the program, I get the following:

 ejn$ gcc -v -Wall testcomb.c
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
/usr/libexec/gcc/darwin/ppc/3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D__APPLE_CC__=1495 -D__DYNAMIC__ testcomb.c -fPIC -quiet -dumpbase testcomb.c -auxbase testcomb -Wall -version -o /var/tmp//ccOUuu0w.s GNU C version 3.3 20030304 (Apple Computer, Inc. build 1495) (ppc-darwin) compiled by GNU C version 3.3 20030304 (Apple Computer, Inc. build 1495). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/ppc-darwin/include"
ignoring nonexistent directory "/Local/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include/gcc/darwin/3.3
 /usr/include
End of search list.
Framework search starts here:
 /System/Library/Frameworks
 /Library/Frameworks
End of framework search list.
/usr/libexec/gcc/darwin/ppc/as -arch ppc -o /var/tmp//ccaWA8pt.o /var/tmp//ccOUuu0w.s ld -arch ppc -dynamic -o a.out -lcrt1.o -lcrt2.o -L/usr/lib/gcc/darwin/3.3 -L/usr/lib/gcc/darwin -L/usr/libexec/gcc/darwin/ppc/3.3/../../.. /var/tmp//ccaWA8pt.o -lgcc -lSystem |
 c++filt3
ld: Undefined symbols:
_gsl_combination_calloc
_gsl_combination_fprintf
_gsl_combination_free
_gsl_combination_next

Here is the test program in case anybody would like to refer to it.

#include <stdio.h>
#include <gsl/gsl_combination.h>

int
main (void)
{
  gsl_combination * c;
  size_t i;

  printf ("All subsets of {0,1,2,3} by size:\n") ;
  for (i = 0; i <= 4; i++)
    {
      c = gsl_combination_calloc (4, i);
      do
        {
          printf ("{");
          gsl_combination_fprintf (stdout, c, " %u");
          printf (" }\n");
        }
      while (gsl_combination_next (c) == GSL_SUCCESS);
      gsl_combination_free (c);
    }

  return 0;
}


If anybody can explain to me what I am doing wrong, I would greatly appreciate it! I know there are some issues with dynamic libraries and Mac OS X but I have compiled these libraries as suggested with 'disable-shared.'

Elspeth Nickle




reply via email to

[Prev in Thread] Current Thread [Next in Thread]