Hi,

I'm new to using gnulib so I'm probably making some trivial mistake.

Anyway, I try to use the dirname module in a C++ context which results in:

libtool: link: g++ -g -O2 -o bin/.libs/foo bin/foo.o -Wl,-bind_at_load -L/opt/local/lib -L/usr/lib ./lib/.libs/libyat-util.dylib -lcblas ./gnulib/.libs/libgnu.a /usr/local/lib/libyat.dylib /opt/local/lib/libgsl.dylib -lm -lbam -lz
/usr/bin/ld: Undefined symbols:
_program_name

I've trimmed down my program to the minimum:

#include <config.h>
extern "C"
{
#include "dirname.h"
}

int main(int argc, char* argv[])
{
    base_name(argv[0]);
    return 0;
}

and still get the same error.

I imported gnulib using the following command:
gnulib-tool --source-base gnulib --libtool --import dirname

Any idea what I'm doing wrong?

Thanks,
Peter


Reply via email to