[Click] external library

Jack Chan lesswire4us at gmail.com
Wed Oct 11 14:53:03 EDT 2006


Hi:

I tried the method mentioned in FAQ by adding ELEMENT_LIBS to the element
file. However, it still complains about undefined symbol (compiled fine). I
wrote a simple library and a test element to call it, I attached them in
case someone wants to look at it.

I am using CLick CVS version, GCC 4.1.0, and working on a separate Click
package (makefile etc copied from etc/samplepackage) - I wonder whether this
is the problem. The CXX compliation worked, then g++ created a shared
library mypackage.uo which gets installed. But I didn't see from the make
output when my library gets linked. Is there anything I need to modify
configure/make files?

Thanks for your help,
Jack


Jack,
>
> Did you ever notice that we answered this question eventually?  Try
> ELEMENT_LIBS, as described in the FAQ towards the end:
>
> http://www.read.cs.ucla.edu/click/faq
>
> Eddie
>
>
> Jack Chan wrote:
> > I am trying to build a new package in which I use mysql through mysql++
> at
> > userlevel. I can compile and install, but when I run a configuration, I
> got
> > undefined symbol error:
> >
> > While loading package 'sql':
> >   package /home/jack/lib/sql.uo: undefined symbol:
> > _ZN7mysqlpp10Connection7connectEPKcS2_S2_S2_jcjS2_j
> >
> > I have modified Makefile.in as:
> > INCLUDES = -I. -I$(top_builddir) -I$(srcdir) $(CLICKINCLUDES)
> > -I/home/jack/include/mysql/ -I/home/jack/include/mysql++/
> > LDFLAGS = $(CLICKLDFLAGS)  -L/home/jack/lib -L/home/jack/lib/mysql
> >
> > I found a couple of similar requests in mailinglist archive, but
> couldn't
> > figure out the solution that worked. Also looked the Makefile.in of the
> RON
> > package, but not fruitful. Are there general guidelines on using
> external
> > libraries in packages?
> >
> > Also, I got undefined symbol errors when using my non-element classes,
> how
> > do I "export" them?
> >
> > Thanks,
> > Jack
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testme.tar
Type: application/x-tar
Size: 20480 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20061011/dabe6909/testme-0001.tar


More information about the click mailing list