Насколько цпп поддержан под аос4?
A: One difference beetwen let's say GCC on unix, its that our one builds as single-threaded.
Q: What exactly does this mean? I have a C++ project with different processes in them, communicating using ordinary messages, and it seems to work fine.
I have heard something about C++ exceptions not functioning correctly in threads (or rather, processes), but I did some testing, and that also seems to work.
A1: The problem is not running multiple threads itself, but what should happen when you use C++ features such as exceptions. For example, what should happen if an exception occurs in one thread, but needs to be handled in another? What mechanism should be used to handle such a case?
C++ can't stop you from starting new threads/tasks but, without C++ multi-threading support, you need to respect the limitations.
A2: Threading in C and C++
It is very important to note that both C and C++ (current standard) do not specify nor directly support threading. This may come as a surprise to many programmers that have been developing threading applications in both C and C++ for many years.
Since there is no official standard, threading has always been system dependent and several threading standards have come and gone over the years. One popular threading standard is called POSIX Threads or pthreads for short.
AmigaOS supports a subset of the pthreads standard. It is implemented as a standard shared library with both static and dynamic link interfaces. The dynamic link interface is an Amiga shared object named libpthread.so. The static link interface is available in both newlib and clib2 flavours. These link libraries are just thin wrappers for the underlying pthreads.library.
With C the threading issue is relatively simple and GNU GCC supports a memory model which supports threading so there is little for an Amiga programmer to worry about. This is true for all platform GCC supports.
The C++ programming language is a more complicated issue. The current GCC compiler implementation does not support threading on AmigaOS. This can be verified with the g++ -v command. The output of this command will specify what threading model is supported. On AmigaOS it currently states:
Thread model: single
This means threading is not supported. As a consequence, C++ exceptions and the RTTI feature will not function correctly in the presence of threads. Both features are optional in C++ but highly desirable as well. The Amiga programmer needs to make some tough decisions in this case.
Есть какая-то библиотека классов/фреймворк
Грубо говоря, существует ли для амиги некая библиотека классов, где, чтобы создать окошко (упрощенно, для примера), я могу сделать какой-нибудь новый объект класса Window, или я должен писать класс-обертку сам?
Есть какие-нить инсайдерские интересные новости по поводу того, что происходит сейчас с AmigaOS 4, да и вообще на сцене?
anny писал(а):Есть какие-нить инсайдерские интересные новости по поводу того, что происходит сейчас с AmigaOS 4, да и вообще на сцене?
Угу, в целом есть интересное, сегодня скорее всего напишу развернуто в старом топе где писал раньше.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 3