try looking at the Makefile.example which is included with the example plugin...

# Desc: Example plugin makefile
# CVS: $Id: Makefile.example,v 1.6 2005/08/17 23:55:59 gerkey Exp $

all: libexampledriver.so

%.o: %.cc
    $(CXX) -Wall -fpic -g3 `pkg-config --cflags playercore` -c $<

libexampledriver.so: exampledriver.o
    $(CXX) -shared -nostartfiles -o $@ $<

clean:
    rm -f *.o *.so


On 19/10/2007, AASS <bananen_6@hotmail.com> wrote:

I'm having problems compiling a driver I have written.

I have read several posts regarding how to get the driver into the plugin
drivers but I am having problems even compiling to get the .o files. I get
the following error:

/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x18): undefined reference to `main'
/tmp/ccrhEQex.o: In function `Alfred::Alfred(ConfigFile*, int)':
alfred_driver.cc:(.text+0x77): undefined reference to
`Driver::Driver(ConfigFile*, int, bool, unsigned int, int)'
/tmp/ccrhEQex.o: In function `Alfred::Alfred(ConfigFile*, int)':
alfred_driver.cc:(.text+0xbb): undefined reference to
`Driver::Driver(ConfigFile*, int, bool, unsigned int, int)'
/tmp/ccrhEQex.o: In function `Driver::Update()':
alfred_driver.cc:(.text._ZN6Driver6UpdateEv[Driver::Update()]+0x17):
undefined reference to `Driver::ProcessMessages()'
/tmp/ccrhEQex.o: In function `Alfred::~Alfred()':
alfred_driver.cc:(.text._ZN6AlfredD0Ev[Alfred::~Alfred()]+0x17): undefined
reference to `Driver::~Driver()'
/tmp/ccrhEQex.o: In function `Alfred::~Alfred()':
alfred_driver.cc:(.text._ZN6AlfredD1Ev[Alfred::~Alfred()]+0x17): undefined
reference to `Driver::~Driver()'
/tmp/ccrhEQex.o:(.rodata._ZTV6Alfred[vtable for Alfred]+0x8): undefined
reference to `Driver::StartThread()'
/tmp/ccrhEQex.o:(.rodata._ZTV6Alfred[vtable for Alfred]+0xc): undefined
reference to `Driver::StopThread()'
...
(and a lot more undefined reference errors)

I even tried compiling exampledriver.cc found in player/examples/plugins/
but I get the same results. I suspect it is the makefile I am using, (which
is my own as I cannot really understand the provided makefile in the
example). It looks like this:

// ---- Start of Makefile ------///

all: clean driver serial

clean:
        \rm -f *.o *~ vmc_serial vmc_driver

serial: vmc_serial.cc
        g++ -Wall `pkg-config --cflags playerc++` -o vmc_serial
vmc_serial.cc `pkg-config --libs playerc++`

driver: vmc_driver.cc
        g++ -Wall `pkg-config --cflags playerc++` -o vmc_driver
vmc_driver.cc `pkg-config --libs playerc++`

// ---- End of Makefile ------///

Any help would be greatly appreciated.

--
View this message in context: http://www.nabble.com/Compiling-Plugin-Driver-tf4648834.html#a13280685
Sent from the playerstage-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
This email is intended for the addressee only and may contain privileged and/or confidential information