bug-gnulib
[Top][All Lists]
Advanced

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

using dirname module in C++


From: Peter Johansson
Subject: using dirname module in C++
Date: Fri, 13 Aug 2010 10:37:55 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

 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

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