From: Toby C. <tco...@pl...> - 2007-07-24 22:11:23
|
hi, What is the output of pkg-config --libs playerc++ and pkg-config --cflags playerc++ On 25/07/07, Dongqing <don...@gm...> wrote: > > > Hi, > > The code as I attached doesn't use any thing about the GUI yet. > myrun.cc: > > #include <libplayerc++/playerc++.h> > #include <iostream> > #include <math.h> > #include "args.h" > #define RAYS 32 > int main(int argc, char **argv) > { > parse_args(argc,argv); > double i=0; > double newspeed; > newspeed=0.4; //unit: m/sec > double robot_x,robot_y,robot_path; > // we throw exceptions on creation if we fail > try > { > using namespace PlayerCc; > PlayerClient robot(gHostname, gPort); > Position2dProxy pp(&robot, gIndex); > std::cout << robot << std::endl; > pp.SetMotorEnable (true); > while(i<100) > { > // this blocks until new data comes; 10Hz by default > robot.Read(); > robot_x=pp.GetXPos(); > robot_y=pp.GetYPos(); > std::cout << "X position: "<< robot_x << std::endl; > std::cout << "Y position: "<< robot_y << std::endl; > robot_path=pow(pow(robot_x,2)+pow(robot_y,2),0.5); > if(robot_path>=3.0) break; > pp.SetSpeed(newspeed, 0); > } > } > catch (PlayerCc::PlayerError e) > { > std::cerr << e << std::endl; > return -1; > } > } > In fact, the compilation was ok last week. > I even tried to reinstall the player. The same error repeated. > One thing I am not sure is the GLut. Before the player installation,I > installed the MesaGlut. > I was thinking to install other glut packages not Mesa. > But I cannot get them installed. > Thanks, > Dongqing > > > Austin Stanhope wrote: > > > > By the looks of it, it seems like you're trying to run a GUI through > > GLUT for your program. This is a GLUT problem and not a Player > > problem. Make sure that you're compiling correctly for GLUT. > > > > If memory serves correctly, there should be some -lglut flag or > > something like that. > > > > Maybe some of the GLUT users out there can shed some light onto this. > > > > -Austin > > > > Dongqing wrote: > >> Hi, > >> > >> # g++ -o myrun `pkg-config --cflags playerc++` myrun.cc `pkg-config > >> --libs > >> playerc++` > >> /usr/lib/libglut.so.3: undefined reference to `XGetExtensionVersion' > >> /usr/lib/libglut.so.3: undefined reference to `XFreeDeviceList' > >> /usr/lib/libglut.so.3: undefined reference to `XQueryDeviceState' > >> /usr/lib/libglut.so.3: undefined reference to `XListInputDevices' > >> /usr/lib/libglut.so.3: undefined reference to `XFreeDeviceState' > >> /usr/lib/libglut.so.3: undefined reference to `XOpenDevice' > >> /usr/lib/libglut.so.3: undefined reference to > `XmuLookupStandardColormap' > >> /usr/lib/libglut.so.3: undefined reference to `XSelectExtensionEvent' > >> collect2: ld returned 1 exit status > >> > >> Thanks. > >> Dongqing > >> > >> > > > > > > -- > > Austin Stanhope www.cse.unr.edu/~stanhope > > Robotics Research www.cse.unr.edu/~society > > Computer Science and Engineering www.cse.unr.edu > > University of Nevada, Reno www.unr.edu > > > > Abuse it and you'll lose it. I WILL Procmail you. > > Think before you click that forward button. > > > > > > > > > ------------------------------------------------------------------------- > > 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 > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > > > > > -- > View this message in context: > http://www.nabble.com/compile%3A-undefined-reference-error-tf4137821.html#a11772580 > 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 > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > -- This email is intended for the addressee only and may contain privileged and/or confidential information |