Reference for Linux API like MSDN? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there any nice to read Linux API reference like the one offered by MSDN or boost? I like the detailed information about the parameters from MSDN and the pre- an post conditions from the boost documentation. But until now I found nothing comparable in the net for Linux.

The man pages are definitely a good start, as others have noted. If you'd like something more formal and rigorous, however, I would recommend reading the POSIX specification. Here is the index of functions in the standard:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html
Looking at what the standard requires, rather than what the current implementations of these functions on Linux happen to do, will also help you write more portable, robust software.

Read first good books like Advanced Linux Programming (you can download it) and Advanced Unix Programming
Be aware that GNU/Linux is by definition less monolithic than Windows (because many contributors are working on it, and) because it is made of many independent programs.
Therefore, there is no well defined Linux API (except for the kernel syscalls; but GNU/Linux is more than the kernel)
Of course, read the man pages, in particular start with the intro(2) man page about syscalls and other man-pages.
Be aware that Linux is nearly implementing (a superset of) the POSIX standard specification from the OpenGroup.
Read also many good documentations from TLDP.
If you are interested by desktop application development, understand first what
X11 is, (beware, X11 is very complex in the details). Then read documentation from freedesktop. Better yet, learn to use a graphical toolkit like Qt or Gtk
And GNU/Linux is made of free software, you can download and study the source code and improve it. You'll very often use some existing free software library, and you may study its source code (and each of them has its own documentation). Part of your work is finding good free software related to your needs. freecode and sourceforge are good resources (and they are many others).

I have this bookmarked.
The Linux man-pages project

Related

How to read/interrogate a filesystem and file structure [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
As a first time programming using vi with a raw Linux terminal in C++, what is the simplest way to recurse through a filesystem and get results such as file size, date, directory date etc?
I imagine I'm missing a library or two that would handle this pretty cleanly which would be great to know. Even better would be knowing where to find a solid reference for the basics like this.
If you have a modern compiler you can use std::filesystem:
https://en.cppreference.com/w/cpp/filesystem
Otherwise you can use boost::filesystem, which is very similar but non standard:
https://www.boost.org/doc/libs/1_67_0/libs/filesystem/doc/index.htm
Boost is a collection of libraries with various purposes and a focus on quality. Boost libraries regularly end up in the new C++ standards so it's good thing to learn.
You might consider (on Linux at least) to use nftw(3). You could use opendir(3) + readdir(3) + closedir with stat(2) (and nftw is using all these). See also syscalls(2) (and read some Linux programming book, perhaps the old ALP). Notice that on Linux (and POSIX systems), the operating system API is in C, not in C++.
Of course, you might use the C++ functions given in f4's answer (they are are based on functions above).
And you could use C++ frameworks such as boost, poco, Qt (also using the functions above).

QNX C/C++ software [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
How can I get QNX C/C++ sample code?
Since QNX is proprietary, it can be hard to get a "jump start".
But as Research In Motion (the makers of BlackBerry) acquired it and are heavily investing on it - in the hopes to get as many developers as possible to jump on the new BBX platform, you may benefit from learning QNX via RIM - and maybe even winning a free Playbook tablet.
You can download the Native Development Kit (NDK) from this website: https://bdsc.webapps.blackberry.com/native/
It is a slightly modified version of Eclipse called Momentics. Using the Playbook simulator (which runs under a - hopefully - free version of VMWare) you can write, compile and run your QNX softwares.
I suggest you taking a close look at PPS objects. They are the most outstanding "idiosyncrasy" of QNX and mastering it will pretty much enable you as a QNX developer. Also, try to register for Foundry27 on QNX website and there you will find handful of (unfortunately almost hidden from Google) resources on QNX.
I hope that helps!
EDIT: and with the NDK it comes with a handful of examples. You will find them pretty much similar to POSIX.
QNX Community Resources is always a good source of help and sample code for QNX.
Usually, library reference entries have a small sample code, e.g. MsgDeliverEvent.
If you go to QNX.com, download the QDE/Momentics trial, you'll get an Eclipse-CDT which will have examples available from the start page.
QNX Neutrino is also similar enough to Linux/Unix systems that most software examples (for example socket and terminal io code) will be equally applicable to QNX as they are for their Unix system.

C/C++ Libraries for reading from Universal Disk Format devices or files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Are there any good free C/C++ libraries that enable reading from common devices with filesystems such as UDF, and ISO9660 and extracting files/metadata etc.?
So far all I've been able to find is GNUs libcdio which is promising, and some "Magic UDF" which has so many hits I'm disgusted, pushes other results in Google, and comes with a pretty extreme looking price tag.
Cross-platform support is preferable (personal preference of course), and Windows compatibility is an unfortunate requirement. The less restrictive the license, the better, I have yet to investigate how compatible libcdio's GPLv3 license is.
Note this question is still open, I'll accept another answer if someone locates such a library.
After extensive investigation, I ended up rolling my own solution to perform the operations on UDF that I required. I'm unable to open the source, in all it was about 800 lines of C++. However here are several links which got me through:
The reference standard on which UDF is built
Universal Disk Format specification 2.60
Brief introduction to UDF
Wikipedia Page
UDF Verifier tool (you must sign up for access to this)
A few words of warning: Previous experience implementing ISO9660/ECMA-119 helped me significantly. Knowledge of how block devices operate and interface with the operating system is helpful. Information surrounding the physical layout and separation of sessions is somewhat mythical and difficult to grok.
See: http://www.thefreecountry.com/sourcecode/cpp.shtml
There are a lot of open source library for this but reliability is question.
On Windows You can use Image Mastering API. It comes with Window SDK , Work on both XP & Vista
http://msdn.microsoft.com/en-us/library/aa364806%28VS.85%29.aspx
7-Zip supports extracting files from UDF and ISO disk images, and is mostly LGPL licensed. Specifically, the UDF implementation code appears to be in CPP/7zip/Archive/Udf/UdfIn.cpp.

qpThreads documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any documentation on qpThreads? In what way is it different from pthreads?
It looks like qpthread has become a sourceforge project. It hasn't changed in four or five years from the CVS repository and doesn't seem to contain any documentation. Chances are that if you don't have docs on it, then none exist save for the source code and headers of course.
I grabbed the source out of curiosity and it looks like a pretty standard threading implementation that is layered over pthreads. The largest difference is that pthreads is a C-style interface and qpThreads is an OO interface more akin to what you might find in Java. I haven't delved into it very deeply, but you might want to look at the interfaces like java.util.Timer and java.util.concurrent. Some of the interfaces look quite similar to what qpThreads offers.
You might want to investigate replacing it with Boost.thread or something more recent. Chances are that you will have better luck maintaining it. It shouldn't be that hard to do depending on how much code you have to deal with.
From a cursory look at google search results, qpThreads seems to be an obscure C++ threading class library. pthreads is a very widely used, POSIX-compliant, multi-platform threading C API.
The most important thing about using libraries is making sure they are actively maintained.
You should use a well known and heavily used library if possible. This way you will also have a vast number of people to ask questions if you have any.
Please see this similar SO question for more details:
Good c++ lib for threading (or use the search box for more).
Found some documentation finally.
Sourceforge qpthreads

Open Source & Cross Platform Multiplayer/Networking Libraries? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
While raknet seems fairly interesting and really appealing from a feature-point of view, its licensing terms seem to be possibly troublesome for GPL'ed projects that may be leveraged commercially, something which is explicitly forbidden by the terms of the creative commons license.
While there's also opentnl, it doesn't seem to be as actively maintained anymore nowadays, in fact downloading the latest stable tarball even fails during compilation because it doesn't seem to support gcc >= 3.0 (?)
Of course, there's still also enet, but this one cannot be really compared to the abstract features that are supported by raknet/opentnl.
So, apart from any non-trivial dependencies such as ACE, Boost or Poco, are there any viable alternatives for embedding a fairly compact, well-maintained UDP-networking library?
Thanks
The wiki of Ogre3D provides a list of networking libraries and a short description for them.
Though this answer comes late to the party, I'm using OpenTNL for my game, Bitfighter, and I really like it. I use it on OS X, Windows, and Linux without a hitch. True, it's not maintained by its creator, but when I get the time, I'm going to create a new SourceForge project for it so people have a place to post their patches. It's stable and (fairly) well documented, so I would recommend giving it another look.
I have been looking for something very similar, but to no avail. So, I decided to create my own C++ Networking Library, at the time of this writing it isn't complete, but will be very soon. I will keep you up to date if your interested in trying it out. It's features so far are TCP/UDP, IPv4, IPv6 Async/Sync and multicasting. If there are any other features you have in mind that should be implemented, just let me know :)
Unfortunately network programming tends to be non-trivial.
Said that you would be advised to get aquainted with the network programming facilities from either Boost or ACE, as both are mature libraries that have been successfully employed in many applications.
I would also suggest to read C++ Network Programming: Mastering Complexity Using ACE and Patterns and C++ Network Programming: Systematic Reuse with ACE and Frameworks