Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vxworks with C++

123 views
Skip to first unread message

Xiangdong Peng

unread,
Apr 7, 2003, 11:36:05 AM4/7/03
to
I built the simpPc with the following defined the config.h

#define INCLUDE_CPLUS
#define INCLUDE_CPLUS_STL
#define INCLUDE_CPLUS_STRING
#define INCLUDE_CPLUS_IOSTREAMS
#define INCLUDE_CPLUS_COMPLEX
#define INCLUDE_CPLUS_IOSTREAMS_FULL
#define INCLUDE_CPLUS_STRING_IO
#define INCLUDE_CPLUS_COMPLEX_IO

but when I downloaded the test.o with sourcecode like that.
#include <iostream>
using namespace std;

int test()
{
cout <<"Hello World"<< endl;
}

there are such errors


Errors while downloading C:/Tornado2.2/target/proj/Project1/SIMNTgnu/test.o:
___terminate
___sjthrow
_endl__FR7ostream
_cout
___ls__7ostreamPCc
___rtti_si
___rtti_class
___rtti_user


How does this happen? Thanks a lot


Xiangdong Peng

unread,
Apr 7, 2003, 11:58:47 AM4/7/03
to
BTW, I also check the target server startup information:
tgtsvr (vxsim1@google): Mon Apr 07 11:57:35 2003
Checking License ...OK
Connecting to target agent... succeeded.
Attaching C++ interface... succeeded.
Attaching pecoff OMF reader for SIMNT CPU family... succeeded.


"Xiangdong Peng" <peng...@msu.edu> wrote in message
news:b6s5r3$gc0$1...@msunews.cl.msu.edu...

Piyush Gupta

unread,
Apr 7, 2003, 6:03:16 PM4/7/03
to VxWorks Users Group List
assuming you included "vxworks.h" in the very first line? -check.

Xiangdong Peng wrote:

> _______________________________________________
> VxWorks Users Group mailing list
> VxWe...@lbl.gov
> http://www-csg.lbl.gov/vxworks/

John

unread,
Apr 7, 2003, 11:19:13 PM4/7/03
to
Hello,

OK, basic questions since you are using the simulator, which does not
behave the same way as a real target:

1) After you built the simulator did you restart it. I don't mean
reboot it - that's not good enough. You must exit the process and
restart it.

2) When you started it, did you make sure it was set up to use your
custom simulator configuration, and not the default one. IIRC, the
simulator menu option/button will launch the configuration that came
on the CD. Unless that was the simulator config that you were
changing, restarting would not cause your changes to be included.

How can you check? Well, try looking up something like 'cout' or
'stream' from the Tornado WindSh window. If they're not there, then
you are not running a simulator image that contains the C++ runtime
support.

Also, I have a feeling that the file you should download is the .out
and not the .o - this doesn't matter much for C, but for C++ it could
as there is an additional step (munching) that is performed for C++
code. Spend 10 minutes and read the section of the User's Guide that
talks about developing C++ code to make sure you are downloading the
correct file.

HTH,
John...

=====
Rate Corporate America at http://exec-ratings.bluedonkey.org

Xiangdong Peng

unread,
Apr 8, 2003, 4:37:29 PM4/8/03
to
Thanks a lot, I tried these several combination
It seems that problem is caused by missing of "vxworks.h"

"John" <john_...@yahoo.com> wrote in message
news:488e459a.03040...@posting.google.com...

0 new messages