Tag Info

New answers tagged


If I compile my source code into a .so (shared library) on one Linux environment(say RHEL), will it work on other environments also without being recompiled? In general, no. You want to use a build system that supports portability. Autotools is the standard. An alternative is Cmake.


To open a file, you use a construct like the following: int fd; if ((fd = open(path, flags)) < 0) { /* An error occurred, the reason is in errno */ int _errno = errno; /* Save errno value */ fprintf(stderr, "Failed opening file '%s': %s\n", path, strerror(_errno)); return; } /* The file was successfully opened */ So, you have only one ...

Top 50 recent answers are included