I am trying to build an interface to FlightGear for UAV simulation. Here is the basic idea: construct a piece of software which reads properties from FlightGear via UDP or Serial, and sends control commands to FlightGear via UDP or serial.
I found the Atlas project which does part of what I am trying to do, so I am building my code based on the Atlas code. I am having trouble using the simgear socket libraries however. When I build my file, I get the following errors: softSim.cpp:(.text+0x4f1): undefined reference to `SGSocket::SGSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' softSim.cpp:(.text+0x66c): undefined reference to `SGSerial::SGSerial(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' softSim.cpp:(.text+0x7d7): undefined reference to `SGSocket::SGSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' I have simgear 1.0.0 installed. I am using ubuntu 8.04 Simgear is installed in: /usr/local/include/simgear/ This is the build command in Geany: g++ -Wall "%f" -lglut Here are what I believe to be the relevant excerpts from my code: Include statements and SGIOChannel initialization: #include <memory.h> #include <stdio.h> #include <simgear/compiler.h> #include SG_GLUT_H #include <plib/fnt.h> #include <plib/pu.h> #include <string> #include <simgear/io/sg_socket.hxx> #include <simgear/io/sg_serial.hxx> SGIOChannel *input_channel; this is the offending code inside the main function: if (slaved) { glutTimerFunc( (int)(1000.0f/update), timer, 0 ); if ( network ) { input_channel = new SGSocket( "", port, "udp" ); } else if ( serial ) { input_channel = new SGSerial( device, baud ); } else { printf("unknown input, defaulting to network on port 5500\n"); input_channel = new SGSocket( "", "5500", "udp" ); } input_channel->open( SG_IO_IN ); } Please help me resolve these errors. Also if you think I am on the wrong track for what I am trying to accomplish, please let me know. Thanks, Cory ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel