Hi all,

I am compiling one of the player codes using

g++ -o example0 `pkg-config --cflags playerc++` example0.cc `pkg-config --libs playerc++`

prasad@Vogue:~/my_programs/player_progs$ pkg-config --libs playerc++
-L/usr/local/lib -lplayerc++ -lplayerc -lm -lplayerxdr -lplayererror

prasad@Vogue:~/my_programs/player_progs$ pkg-config --libs playerc++
-I/usr/local/include/player-2.1 

Now when i try to cross compile using arm based g++ compiler by using

prasad@Vogue:~/my_programs/player_progs$ ./my_g++ -c  -I/usr/local/include/player-2.1/libplayerc++/ slow_turn.cc
i get no errors and i can find slow_turn.o in the current directory.

But when i try to build the executable for the arm based processor using

prasad@Vogue:~/my_programs/player_progs$ ./my_g++ slow_turn.o -o slow_turn

here my_g++ is obtained by copying g++ cross compiler to the current directory and renaming it to my_g++.

And the listed errors are:
slow_turn.o: In function `main':
slow_turn.cc:(.text+0x610): undefined reference to `PlayerCc::PlayerClient:
:PlayerClient(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, int)'
slow_turn.cc:(.text+0x674): undefined reference to `PlayerCc::Position2dProxy::Position2dProxy(PlayerCc::PlayerClient*, unsigned int)'
slow_turn.cc:(.text+0x718): undefined reference to `PlayerCc::PlayerClient::Read()'
slow_turn.cc:(.text+0x7a8): undefined reference to `PlayerCc::Position2dProxy::~Position2dProxy()'
slow_turn.cc:(.text+0x7d0): undefined reference to `PlayerCc::PlayerClient::~PlayerClient()'
slow_turn.cc:(.text+0x864): undefined reference to `std::operator<<(std::basic_ostream<char, std::char_traits<char> >&, PlayerCc::PlayerError const&)'
slow_turn.cc:(.text+0x888): undefined reference to `PlayerCc::PlayerError::~PlayerError()'
slow_turn.cc:(.text+0x8a0): undefined reference to `PlayerCc::PlayerError::~PlayerError()'
slow_turn.o: In function `PlayerCc::Position2dProxy::SetSpeed(double, double)':
slow_turn.cc:(.text._ZN8PlayerCc15Position2dProxy8SetSpeedEdd[PlayerCc::Position2dProxy::SetSpeed(double, double)]+0x40): undefined reference to `PlayerCc::Position2dProxy::SetSpeed(double, double, double)'
collect2: ld returned 1 exit status

i also tried to compile using :
prasad@Vogue:~/my_programs/player_progs$ ./my_g++ slow_turn.o -o slow_turn -lm -lplayerc++

i get the following errors:

/home/prasad/gumstix/gumstix-oe/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lplayerc++
collect2: ld returned 1 exit status


i know its a problem with the linking stage. Can anyone provide me with some fixes for this problem ?


Thanks for the help and time.



--
-Prasad