Path: utzoo!attcan!uunet!decwrl!apple!claris!ClarisII!pierre From: pierre@iti.org (Pierre Omidyar) Newsgroups: comp.sys.mac.programmer Subject: Re: C++ and StandAlone code Keywords: c++,standalone,virtual,alone Message-ID: Date: 18 Sep 90 00:56:06 GMT References: <1990Sep14.213042.7136@asterix.drev.dnd.ca> Sender: news@claris.com Lines: 39 louis@asterix.drev.dnd.ca (Louis Demers) writes: >Hello, > We are working on a project involving MacApp 2.0, C++ 3.1b1 >and A/ROSE ( on a card from GreenSpring Computers). > We would like to write the A/ROSE executable in C++. So far we >have had only limited succes. We were able to succesfully execute the >following: > a) a standard C program compiled with the C++ compiler. > b) a C++ program without any virtual functions > We were NOT able to get a C++ program with virtual functions >to execute properly. When the virtual function got called, the card >crashed. Here is where you have your problem: to implement virtual functions, C++ requires static vtables. Since MPW does not automatically support the use of globals in non-applications, this won't work. This should work, however, if you are building an application (linking with the Runtime.o library, which has the code for initalizing global data). >-- >| Louis Demers | DREV, Defence Research Establishment,Valcartier | >| louis@asterix.drev.dnd.ca | POBox 8800, Courcelette,Quebec, CANADA, G0A 1R0 | >| (131.132.48.2) | Office: (418) 844-4424 fax (418) 844-4511 | >+---------------------------+-------------------------------------------------+ Pierre -- -- Pierre Omidyar {ames,apple,portal,sun,voder}!claris!pierre Claris Corporation pierre@claris.com Opinions are mine and not Claris'