Problem linking .0 file to nullclient

Sadrul Habib Chowdhury imadil at gmail.com
Wed Jul 30 13:21:57 EDT 2008


* Florin Diaconeasa had this to say on [30 Jul 2008, 00:57:30 +0300]:
> Hi!
> 
> I'm currently trying to extend the nullclient that comes with the sources of
> pidgin(in libpurple).
> 
> I have created a directory inside the example directory, which is called
> Managers. Inside this directory i have 2 files:
> 
> Test.h
> Test.c
> 
> written in C ofcourse.
> 
> Here i have 2 functions testOne() and testTwo()
> 
> The problem that i'm facing right now is that i can't seem to be able to
> link the Test.o file to the compilation of nullclient
> 
> I've modified the LINK var(in the Makefile.in) so to contain
> Managers/Test.o, but it doesn't do the trick, as i get undefined reference
> to testOne() and testTwo()

You should not manually modify Makefile.in files in pidgin, rather you
need to change Makefile.am files appropriately.

I am really bad at this kind of stuff, but a quick test seems to work
with the following patch:


--- libpurple/example/Makefile.am	97c7ad98ab6004d787ad89831f30103ac820bda8
+++ libpurple/example/Makefile.am	ae2d118b214d47bd49c1d55e33237f20031f357a
@@ -1,6 +1,6 @@ noinst_PROGRAMS = nullclient
 noinst_PROGRAMS = nullclient
 
-nullclient_SOURCES = defines.h nullclient.c
+nullclient_SOURCES = defines.h nullclient.c managers/test.h managers/test.c
 nullclient_DEPENDENCIES =
 nullclient_LDFLAGS = -export-dynamic
 nullclient_LDADD = \
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
 	-I$(top_builddir)/libpurple \
 	-I$(top_srcdir)/libpurple \
 	-I$(top_srcdir) \
+	-I$(top_srcdir)/libpurple/example/managers/ \
 	$(DEBUG_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(DBUS_CFLAGS) \


Sadrul




More information about the Devel mailing list