From mint-bounce@lists.fishpool.fi Sat Feb 14 01:37:01 2009 Message-ID: <499665F5.809@atari-source.org> Date: Sat, 14 Feb 2009 01:34:29 -0500 From: Mark Duckworth User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: mint Subject: [MiNT] C++ Stuff Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SA-Score: -1.4 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mduckworth@atari-source.org Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Hey guys, I am converting GIM and probably SUM to C++. There's a number of obvious advantages to using it for a high level app and I've always wanted to learn it because it offers the majority of the features I am very used to being a day by day C# .net programmer in a language that will run on anything, even MiNT ;) Everything is fine except when I use vectors so far. It seems if I use vector.push_back() there is a call to an FPU function. In gdb this results in an EMTTRAP emulation trap and the program stops running. So am I correct in saying that if I want my program to run on 68000 I would need to compile with libm in order to provide libstdc++ with the math support it desires? It works when I compile with -m68020-60. Does anyone else think it's strange that something as simple as vector would need FPU functions? PS: Adapting a windom program to run in c++ is kind of a pain ;) But I was shocked to find that after doing all of the source modifications, converting to proper objects for buddies and conversations, and then teasing out some other final problems (addition of extern "C" to some spots and the replacement of many malloc's with new char[]'s) that GIM actually worked and signed in! There are some things to do to fix pointers and stuff like that but it's pretty downhill from here ;) Now that it's C++ it'll be easier to expand and it won't be using my horrible home brew linked list and string handling code ;) I thought at one point zorro was using G++ for zview but now when I look it is all C. Thanks, Mark