SWIG

I’m trying to build the SWIG examples using the PGI compilers. The specfic example is called “simple”. Here’s the code:

/* File : example.c */
/* A global variable */
double Foo = 3.0;

/* Compute the greatest common divisor of positive integers */
int gcd(int x, int y) {
  int g;
  g = y;
  while (x > 0) {
    g = x;
    x = y % x;
    y = g;
  }
  return g;
}

I’ve tried all the compiler flags I can think of but I can’t get either the pgcc or pgcpp compilier to stop appending the “_imp” notation in front of the exported symbols. I have to link against the python24.lib and it’s simply not cooperating. Any help would be appreciated!

Joseph

Hi Joseph,

I assume this is on win32? Do you compile and link dynamicallyl? Try compile and link statically.

Hongyon