[Flightgear-devel] Trying to build an interface to flightgear

2008-05-29 Thread cory barton
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_stringchar, std::char_traitschar,
std::allocatorchar  const, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  const,
std::basic_stringchar, std::char_traitschar, std::allocatorchar 
const)'
softSim.cpp:(.text+0x66c): undefined reference to
`SGSerial::SGSerial(std::basic_stringchar, std::char_traitschar,
std::allocatorchar  const, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  const)'
softSim.cpp:(.text+0x7d7): undefined reference to
`SGSocket::SGSocket(std::basic_stringchar, std::char_traitschar,
std::allocatorchar  const, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  const,
std::basic_stringchar, std::char_traitschar, std::allocatorchar 
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/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Trying to build an interface to flightgear

2008-05-29 Thread Csaba Halász
On Thu, May 29, 2008 at 9:01 PM, cory barton [EMAIL PROTECTED] wrote:
 I am having trouble using the simgear socket libraries however.
 ...
 This is the build command in Geany: g++ -Wall %f -lglut

Well, apparently you are not *using* the simgear libs ... you need to
link them into your program, such as by adding something like
-lsgserial -lsgio and any other libs these might depend on.

-- 
Csaba/Jester

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] John Wojnaroski - 747 help please

2008-05-29 Thread John Wojnaroski
Gijs de Rooy wrote:



Hello John, Thanks to Georg Vollnhals I found your emailadres, but becayse I 
didn't get an answer I try to reach you through the mailinglist. 

Sorry,  I did not see your earlier post.  Possible my spam filters may 
have blocked it.  ATM, I'm very busy getting some software ready for 
delivery on a NASA project.  But I will try to answer some of your 
questions this weekend. 

If you wish , you may try and post your private email address again to 
my private email otherwise I'll probably reply on the FG mailing list

Regards
John


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Trying to build an interface to flightgear

2008-05-29 Thread cory barton
Thanks for the tip. You were right, I was not using the simgear libs.
I have had some improvement after adding more libraries to the build command.

Here is the current statement, and the errors I am getting:
g++ -Wall softSim.cpp -lglut -lsgio -lsgserial -lsgdebug -lplibnet
-o softSim (in directory: /home/cory/trunk/softSim)
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libplibnet.so:
undefined reference to `ulSetError(ulSeverity, char const*, ...)'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libplibnet.so:
undefined reference to `ulSetError(ulSeverity, char const*, ...)'
Compilation failed.

I tried adding -lplibfnt but that makes no difference, and if I add
-lplibpu then I get a lot more undefined reference errors.

I am kind of lost here, and do not know how to troubleshoot further,
when I google undefined reference to `ulSetError(ulSeverity, char
const*, ...) or the other undefined reference errors, I end up
finding posts on this list, usually about trouble building flightgear.

If you have any more nuggets of wisdom, please let me know, I am gonna
sleep on it, then keep poking at it in the morning.

Thanks,

Cory

On Thu, May 29, 2008 at 5:10 PM, Csaba Halász [EMAIL PROTECTED] wrote:
 On Thu, May 29, 2008 at 9:01 PM, cory barton [EMAIL PROTECTED] wrote:
 I am having trouble using the simgear socket libraries however.
 ...
 This is the build command in Geany: g++ -Wall %f -lglut

 Well, apparently you are not *using* the simgear libs ... you need to
 link them into your program, such as by adding something like
 -lsgserial -lsgio and any other libs these might depend on.

 --
 Csaba/Jester

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel