Prakash Mahesh (prakash++at++drawcomp.com)
Mon, 01 Dec 1997 17:49:55 -0500
I am not sure what exactly you were trying to do, but this is what I was
doing, when I got into similar problems.
My application starts with Java (where the main function is), and using
Java Native Interface, I got into C, and then C++, and eventually called
Performer functions. And in this case, everytime, it encountered an
iostream call, it was crashing.
After lot of research, we found that it was a simple C++ issue. Just
before main() function is called, the global constructors are called,
thereby initializing the iostream stuff. In my case, there was no main()
in the C/C++ side (it was in the Java side). So, the initizlizations
were never done.
So, this is going to happen, whenever you don't have a C/C++ main() in
your application. This has nothing to do with Performer (as far as I
know).
There is a workaround (assuming that this is what your problem is). From
tha documentation for CC/ld you can see that you can do the
initializations yourself as below:
#include <iostream.h>
extern Iostream_init *io;
io = Iostream_init();
The first two lines comes all the way in the beginning of your first C++
file, and the third line (please check the exact syntax) probably before
any cerr/cout/cin.
Hope this helps.
--
Prakash Mahesh
prakash++at++drawcomp.com
--or--
prakash++at++openworlds.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:19 PDT