K
K
k0taperkot2019-08-12 23:24:51
C++ / C#
k0taperkot, 2019-08-12 23:24:51

Books for C++ development on MacOS?

Hi Please
advise books/blogs/documentation on C++ development for MacOs. Interested primarily in system calls. Probably there is no such book, but suddenly - a book on C ++ for MacOS with an eye on Linux (to emphasize the differences) would be ideal.
I'm aware that MacOS is formally POSIX. The trouble is that it's formal - for example, POSIX semaphores don't work on MacOS, etc. Therefore, watching BSD/POSIX mana does not always work.
I did not find any fresh documentation on the C++ API for Mac - only archives, without a normal search. Maybe I searched badly?
Addition:
GUI is not present and is not necessary. There is a TUI on NCurses. If you suddenly want a gui, we will most likely do it on Qt, because initially it is a huge project under Linux.
The question is in the system calls API - get a list of devices and so on

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
k0taperkot, 2019-08-15
@k0taperkot

Summing up, after studying the topic on your own:
you can write in C / C ++ under macOS, even with the GUI (on Qt, for example), which means you don’t have to switch to Swift or Obj-C / C ++
There is a POSIX API for C/C++ (actually, I couldn't find the official name of this API), which seems to be not going to be cut yet - so it's quite possible to rely on it. There is no normal documentation for it - there are archives of documentation (old mana, in fact), but a new one has not been delivered. You can look at the new functions in the Obj-C/C++ documentation and try - if not all, then some calls are also available in C/C++. In general, on every corner they say "this is Unix", read the mana. So, some system calls that are in Unix / FreeBSD are either not implemented in macOS, or absent at all (and vice versa) - for example, sem_init is not in macOS, and sem_open is not implemented (or vice versa - I don’t remember). Therefore, it will not be possible to limit ourselves to only one source of information - you need to look in mana (just in case everyone - macOS, Unix, BSD) and in office. documentation for Objective-C/C++. Such is the difficult fate of a C++ programmer for a poppy :)
Not so good with books. There is an old book Mac OS X Internals: A Systems Approach by Amit Singh and a series of newer books by Jonathan Levin called *OS Internals . I didn’t find any more books on macOS, but as I wrote above, there are differences from Unix and BSD.
In Russian, I didn’t find any information on development in C / C ++ for macOS at all, maybe this information will be useful to someone :)
Thank you all for the answers and advice :)

R
Ronald McDonald, 2019-08-12
@Zoominger

Write in Qt/C++.
There are a lot of manuals for Kyuta.
Nobody needs bare crosses.

A
Aram Pakhchanian, 2019-08-12
@aram_pakhchanian

Under Mac, you can only write some Unix utilities in C++. If you need an interface, then either call the Cocoa API, but then you need to understand how to call Objective C methods (which in general can be combined with C ++ code, but there will be a lot of fuss with type translation back and forth), or write in portable frameworks, but such applications will not behave like native ones in everything, and in this case you do not write under Mac at all. There used to be a Carbon API, which has its roots in the Mac Classic, but this API will be removed from the release this fall.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question