As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In Windows API there are a big set of methods for manipulating of paths and URLs at Shell Path Handling Functions. The functions include helpers like PathAddBackslash, PathCanonicalize, PathCombine, and PathIsDirectory.
The question is: are there any Posix provided functionality or Linux-based library that gives analogous functionality? That is, simplifies paths combination, canonicalization, parsing, as well as URLs parsing?
I know that it is possible to write such functions with C++ (not small but not complex job), but my question is: are there any ready "official" libraries on Linux that already have similar functionality?
I am quite happy with boost_filesystem. Best part of it is that it is cross-platform, so it also works on Windows.
Another possibility is leveraging the capabilities of Qt or GLIB (GTK+).
Finally, most path-mangling operations are already in the POSIX standard and available out-of-the-box. For an example see the manpage of basename(3), dirname(3):
http://www.kernel.org/doc/man-pages/online/pages/man3/dirname.3.html
You could also use POCO C++ libraries, take a look here:
http://pocoproject.org/features.html
And here you could find more on filesystem api:
http://pocoproject.org/slides/080-Files.pdf
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I would like to include a source code editor inside my software.
The editor should provide at least the following features:
syntax coloration;
syntax validation;
auto-commpletion;
code folding;
inline documentation (displays a called function documentation for example);
extensible, so that it can support more languages in the future; support at least C++, Python, Java, Doc-book, XML, Latex.
Additionnaly, the framework should be in C++, as my own software that wishes to include the framework is in C++ as well. Ideally, it would use the Qt framework.
Finally, it should work at least for GNU/Linux, Mac OS X and Windows.
I wish to avoid develop it myself, as this seems a long and difficult task, and as I expect this need is quite common and many solutions already exist in the outside world.
So far, I only found QScintilla, but I am surprised there is not much more choice.
Do you have any other suggestions ?
Perhaps KatePart is what you are looking for? It's the editor component used in the Kate editor and the KDevelop IDE included in KDE.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Where i can get source code of gethostbyname which can be used without linking other libs(just sockets) for linux?
I found this:
https://github.com/gnif/ARMT/blob/master/common/CDNS.cc
But this doesn't work, error when resolving
Thanks!
"A non-blocking DNS resolver library in a single .c file. Supports both stub and recursive modes."
http://25thandclement.com/~william/projects/dns.c.html
DNS resolution is complicated. Why not use a library? I use c-ares when I need one.
If you don't want to use it as a library you can stuff all its source code files directly into your project although that would be weird.
gethostbyname is anything but simple, as it has to find out what the currently configured source for such data is (local files, NIS, NIS+, DNS, perhaps others), in which order to search there, what to do if the lookup for each one fails (nsswitch.conf(5) et al), and do the looking up and miscelaneous bookkeeping and caching.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm writing a C++ application, that I have to deploy to a server in the future (maybe as a node.js C++ module).
I really need a logging library that help me during the development process.
Now I'm using log4cxx, but I need the code to be portable, so I prefer to have a source file to include in the project. I also need a performing C++ logger, that does not slow down the application in both case with logging turned on and off. Can anyone help me with this choice? My options are:
Log4cplus: simple and easy to use and extend. But performance?
Google-Glog: easiest to use and very very fast. But I need to compile it and it use system flag, I wonder if it is a problem when I use it with node.js.
As far as I know the log4cxx uses Apache runtime as its base so ,portability is not an issue with log4cxx. Also it provides macros for optimized logging. Is there anyother reason you want to shift from log4cxx?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm using OS X Lion, using C++. I've set the dialect to C++11, and the standard library to libc++. In Visual C++, I've heard about the windows.h library and the operations that can be performed with it (such as popping up windows), and was wondering if there were any similar libraries for Mac, and where I can learn about them. I have searched quite a bit, but to no avail.
You're probably looking either at Carbon (which is now obsolete) or Cocoa, which is a modern Objective-C API. You're best off using a combination of C++ and Objective-C to make a graphical app for OS X so you can use the Cocoa library.
Take a look at this related question for more information.
You can use Cocoa Objective-C api or you can use cross-platform c++ solutions, such as Qt or wxWidgets
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking for a C or C++ library that includes several well-known compression algorithms (particularly lossless ones), for the purpose of developing a custom compression scheme and comparing it to generic solutions. I have found one, called Basic Compression Library, but it does not seem to have been updated since 2006. I found a paper about another, called ExCom, that was published in 2010, but the website doesn't have a download link.
Are there other similar libraries that have been updated more recently and/or include more algorithms? Or is there a reason why they don't exist?
I know zlib and bzip
And you could take a Debian Linux distribution, and find all the compression utilities there.
You can try LibArchive, which has an expanding list of compression codecs supported :
http://code.google.com/p/libarchive/wiki/LibarchiveFormats