[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] C++ Stuff



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<T>.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<T> 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