Re: [classad-users] Linker Problems


Date: Thu, 22 Oct 2009 15:53:54 -0500
From: Ole Weidner <oweidner@xxxxxxxxxxx>
Subject: Re: [classad-users] Linker Problems
Hey,

I use these flags: -DWANT_NAMESPACES -DWANT_CLASSAD_NAMESPACE but if I us -lclassad_ns as you're suggesting, I get the following error:

ld: library not found for -lclassad_ns

Which sounds right to me, since there's no libclassad_ns.dylib in the installation directory. Are there any configure flags that control the whole namespace stuff when I build libclassad?

Thanks,
Ole

On Oct 22, 2009, at 2:32 PM, Matthew Farrellee wrote:

Ole Weidner wrote:
Hi,

I'm trying to compile this little test program (extracted from an m4
macro):

#include <classad_distribution.h>

int main ()
{
   classad::ClassAd ad; classad::ClassAdParser parser;

   return 0;
}

With this gcc command line:

g++ -o conftest -g -Wall -I/usr/local/classads-1.0.4//include/ classad
-I/usr/local/classads-1.0.4//include -DWANT_NAMESPACES -
DWANT_CLASSAD_NAMESPACE classadd_test.c -L/usr/local/ classads-1.0.4//
lib -lclassad -ldl

The linker complains about missing symbols:

Undefined symbols:
  "classad::ClassAd::ClassAd()", referenced from:
      _main in ccAha9V1.o
  "classad::ClassAdParser::~ClassAdParser()", referenced from:
      _main in ccAha9V1.o
  "classad::ClassAd::~ClassAd()", referenced from:
      _main in ccAha9V1.o
      _main in ccAha9V1.o
  "classad::ClassAdParser::ClassAdParser()", referenced from:
      _main in ccAha9V1.o
ld: symbol(s) not found

I'm using classads 1.0.4 compiled from sources on OS X 1.6 (64bit).
Any ideas what's going wrong here?

Thanks,
Ole
Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/

Make sure you compiled libclassad with WANT_NAMESPACES, you might need -lclassad_ns instead.

Best,


matt

[← Prev in Thread] Current Thread [Next in Thread→]