From: Ghulam M. H. <gh...@ok...> - 2004-04-06 21:05:46
|
Thanks for the help. i am new with Linux operating system and i do not have enough help in my lab. the below is my make file. i am adding the player related files. Some classes and library files like list.c list.h sensor.c sensor.h sensorcontainer.h and sensorcontainer.cc are there in the same folder where marhesrobotdriver.cc is placed. i am trying to add libcanlib.so residing in path given by INCLUDES2. Can anyone please check it out and inform me. i have also tried to use KDevelop, but its also not compiling my program. i am using SuSe Linux. If there is any prefered C++ programs developing software, please inform me about it too. Thanks for cooperation of everyone. Ghulam. # path to the Player source tree #PLAYER_SRC_DIR = /home/gerkey/code/player PLAYER_SRC_DIR = /home/jose/player-src-1.4rc2 #CAN_LIB_DIR = -L/usr/lib -lcanlib INCLUDES1 = -I$(PLAYER_SRC_DIR)/server INCLUDES2 = -L$/usr/lib/ #-L$/libcanlib INCLUDES3 = -L$/libcanlib.so #INCLUDES4 = /home/ghulam/Documents/robotDriver all: marhesrobotdriver.so %.o: %.cc $(CXX) -Wall -g3 $(INCLUDES1) $(INCLUDES2) $(INCLUDES3) -c $< %.so: %.o $(CXX) -shared -nostartfiles -o $@ $< clean: rm -f *.o *.so VERSION = 0.1 dist: clean cd .. && rm -f player-mod-$(VERSION).tar.gz && ln -sf player-mod player-mod-$(VERSION) && tar -hcvzf player-mod-$(VERSION).tar.gz player-mod- $(VERSION) --exclude player-mod-$(VERSION).tar.gz --exclude CVS && rm -f player-mod-$(VERSION) mv ../player-mod-$(VERSION).tar.gz . Quoting Brian Gerkey <ge...@ro...>: > On Mon, 5 Apr 2004, Ghulam Mubashar Hassan wrote: > > > i am making a driver for my lab's robot. i am getting the following error. > can > > anyone tell me what the reason can be behind it. > > > > ghulam@linux:~/Documents/robotDriver> player -d ./marhesrobotdriver.so > > marhes.cfg > > ** Player v1.4rc2 ** Opening shared object ./marhesrobotdriver.so... > > ./marhesrobotdriver.so: undefined symbol: _ZN14pid_controllerC1EiPii > > [TCP] > > > > Parsing configuration file "marhes.cfg"... > > loading driver "marhesrobotdriver" as device "6665:position:0" > > player error : main.cc:parse_config_file(): > > Couldn't find driver "marhesrobotdriver" > > > > hi, > > Looks like your shared object doesn't contain all the necessary code. > Perhaps the pid_controller symbol (probably a function?) is defined in a > source file that you didn't include when building the .so. Alternatively, > this could be a C++ name-mangling problem. Is your driver is a mix of > C and C++? > > A good UNIX tool for debugging things like is 'nm'. For example: > $ nm marhesrobotdriver.so > will list all the symbols in the library, telling you which ones are > defined and which are not. > > brian. > > -- > Brian P. Gerkey ge...@ro... > Stanford Robotics Lab http://robotics.stanford.edu/~gerkey > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > Ghulam Mubashar Hassan. |