portable zip library for C/C++ (not an application) [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite 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.
Closed 8 years ago.
Improve this question
I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS.
The user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have my makefile install executables.
Prefer open-source. I'm already looking at "Zip 3.0"...

Take a look at Libarchive. I spent a lot of time seeking for a cross-platform and LGPL licensed library with convenient interface. This the best of all I've seen. Very easy and powerful tool. Originally designed for Unix-like systems but there's also the Windows version.

I've had great results with miniz: https://code.google.com/p/miniz/
For a simple compression of strings in c++, I also really like Timo Bingmann's solution.

I'd recommend ZipLib https://bitbucket.org/wbenny/ziplib/wiki/Home
Personal reasons why I love this project:
built around c++11 stl streams (ex. decompresses into stl streams!)
lightweight (no dependencies other than zlib)
can be used on both windows & liunx
It took me a long time to find this project - hope this helps someone.

We've used zlib a couple times here. It's a fairly standard library that has implementations in most main languages.

How about this:
http://zziplib.sourceforge.net/

http://www.info-zip.org/UnZip.html
HTH

Others have mentioned zlib, which is nice and fairly easy.
The 7-Zip (LZMA) SDK is more complex but also has very nice compression rates.
Edit: Although still in development, with the release process and history over time, I would be hesitant to recommend this now.

ZLIB - the most portable library in the world. open source, very proven and reliable. The gold standard.
why use anything else?

Related

light-weight C++ image library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 8 years ago.
Improve this question
I've been looking around for a simple and small yet robust and fast (not comprehensive!) image library for C++ (C would suffice, if no C++ version is available).
Main features I'm looking for are:
Free (opensource is a plus)
Built for speed
No huge functional bloat (like ImageMagik, which is truly comprehensive but is a mammoth)
Tiny memory footprint
Only supports the absolute minimum of functions like load/save, resize, convert between formats. Nothing fancy
Error recovery for "broken" files (unlike stb_image.c, which has pretty poor error recovery)
MSVC and gcc friendly (I used CxImage for a number of years but with the latest version I'm having problems with MSVC 2010 and it would seem that active development and support for it has died out by now, so I'm about to drop it)
Should support popular modern formats, like JPEG2000, either directly or via a use of general libraries like libpng
Don't care if it's DirectX or OpenGL as I don't plan on using it to display the images - only to file-process them for a web site
Having support for both static and dynamic linking is a plus
Threading support is a huge plus
Libraries I looked at and dismissed for one reason or another:
CxImage (no active development on it anymore)
ImageMagik - too huge (and slow)
stb_image.c - bad error handling, doesn't support enough image formats
DevIL (havn't dismissed yet, but haven't looked at it much either - just learnt of it a few minutes ago on a similar post on SO) - based on it's size and feature set it looks very promising for what I need though
FreeImage (same as DevIL - will take a look at it shortly but it's a bit big in size to my taste)
SOIL (same as stb_image.c)
TimThumb - it's a PHP, not a C/C++
In short I just want something as tiny as possible and as fast as possible at the expense of just having the absolute bare minimum of functionality but I'm yet to find a suitable candidate thus far.
Any suggestions from this community, please? But keep in mind the constraints I listed above - I don't think it's OK to throw an answer of a form "have you tried X?" where "X" doesn't meet half of my needs :)
Edit: Looking a bit more into DevIL it would seem it could be what I need. It's light, tiny, robust. Now I just need to make sure it performs.
Oh, and CImage (I forgot to mention it in the list) - didn't like it's performance (though I have to admit that the idea of template-only implementation is cute, to say the least)
I strongly suggest you to write a little library around libpng and jpeglib (and every other low-level library for the formats you need to support). It is not that hard and you can code all the features you require.
As an alternative, you can use some of the good c++ wrappers that already exists for that libraries. Here are some examples:
png++
JPEGReader/JPEGWriter
Look at CImg library, it's just one single header file

Linux to Windows C++ port [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite 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.
Closed 9 years ago.
Improve this question
I am trying to port my C++ application from Linux to Windows (Visual C++).
I am just curious wheter you know about any script/tool that would scan the source code and check for possible issues (such as dirent.h etc).
Thanks.
The first tool is called your compiler. It will tell you if your program compiles.
The second tool is called running whatever tests you may have. They will tell you if the resulting binary works.
What were you looking for, a crystal ball to save you from doing work? Regardless of what approach you take or what you may read to help you get started, you will at some point have to (1) compile the thing and (2) check to see that it works.
Microsoft has an entry on the MSDN about the 'best' ways to manage a port from *nix to Win32.
http://msdn.microsoft.com/en-us/library/y23kc048.aspx
http://www.mingw.org/wiki/msys or http://www.cygwin.com/
edit:
Cygwin is essentially a compatibility layer (implemented as a dll) between Unix/Posix and windows - the code should be unchanged, but there can be issues between different version of the cygwin dll.
Msys+Mingw is a subset of Unix/Posix libs reimplemented in win32 and a port of the gcc compiler plus essential build tools. The resulting exe runs completely natively but some complex build procedures need more work.
Either way if the app uses X then you also need an X-server, both of these provide one. But if you are doing lots of graphics and the app is written using something like Qt or wxWidgets you are going to have a reasonable amount of pain getting it to work.
First, I would just compile using MinGW (at least at first), to eliminate any possible gcc to MSVS issues (not to waste time with compiler-related issues).
Second, just compile the code and watch all the include files that were not found. Go to the code that includes those headers, figure out if it is a dependency that exists in Windows (but was just not installed or set in include-paths). If not, use cross-platform libraries to replace the non-portable libraries. Typical cross-platform libraries would include: Boost, OpenGL, SDL, Qt, etc. (depending on how much your application is doing). If it is just a command-line "number-crunching" software, you will probably find all you need in Boost.

Recommendations for an open-source project to help an experienced developer practice C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 8 years ago.
Improve this question
I'm looking for recommendations for open-source projects written in C++ that will help me "get my chops back". A little background:
I've been working heavily in Java for the last three years, doing a lot of back-end development and system design, but with a fair amount of work in the presentation layer stuff, too.
The last C++ projects I worked on were a Visual C++ 6 project (designed to interact with Visual Basic) for mobile devices and several projects using the GNU toolchain circa gcc versions 2.x to 3.2
I'm looking to get back up to speed on the language and learn some of the popular frameworks, specifically the basics of boost (although boost seems fairly sprawling to me, similar to the kitchen-sink feel of Spring in the java space) and test driven development in C++.
What I'm looking for:
Specific recommendations for small to mid-size open source projects to poke through and perhaps contribute to as I level my C++ skills back up. The problem domain isn't important, except that I would like to work on something in a new area to broaden my experience.
Edit:
A few people have commented that it's difficult to provide a recommendation without some indication of the problem domain I'd like to work in. So, I've decided that I'm most interested in graphics applications or games, two areas which I haven't worked in before.
If you like visual stuff, openFrameworks is a C++ Framework for doing Processing-type applications. http://www.openframeworks.cc/ I'm not sure how viable it still is, but it looked pretty cool.
It's hard to suggest something like this, you really don't have any itches you want to scratch??
I would personally be working on Unladen Swallow if I wasn't absurdly busy starting my own personal venture. Dynamic language optimisation looks pretty cool to me.
You could also look at Wt
Why not Boost itself? It's a very active project, it's right at the core of what C++ is about, and it could need some help.
You mentioned test driven development. The Boost Unit Test Framework, for example, is powerful, but IMHO suffers from extremly bad documentation. That'd be a place to start, would teach you everything there is to know about that particular part of Boost, and I am sure you could find your way into one of the Boost modules from there.
I think you're going to have to be more specific. As a quick check, I did an apt-cache showpkg libstdc++6 on my Debian squeeze system, to find all the packages that depend on the C++ library — and found 4,537 of them. Obvious examples include:
most of KDE
Firefox, Thunderbird, etc.
apt-get itself
It'd really help if you specified what field you're interested in.
You can find many projects on GitHub. If you find a nice project, you can fork it (it's like creating a local copy you can work on) and start coding. Once you have done something nice, you can make a "Pull request" to ask the guy you made your fork from to merge your work.
I like being able to commit without having to ask for an access and be able to make smalls contributions to many projects without having to contact anybody, simply with a couple of clicks.
You can also check Gitorious and Bitbucket, both site work a bit like Github.

What book or online resource do you suggest to learn programming C++ in Linux? [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 7 years ago.
Improve this question
I have years of C++ programming experience in Windows. Now I need to program some applications for Linux. Is there any resource that helps me quickly get the required information about Linux technologies available to C++ developers?
Programming in C++ under Linux isn't all that different at the core. Linux compilers are generally more standard's conforming than MSVC; however, that is changing as MSVC is becoming a better compiler. The difference is more from the environment and available libraries. Visual Studio isn't available (obviously) but some other environments like Visual SlickEdit and Eclipse are available on both.
The build system is widely varied and will probably be dictated by your preference between Gnome, KDE, or the ever-present command line. Personally, I find the latter to be the cleanest and most consistent. If you end up at the command line, then learn GNU Make and pick up a copy of GNU Autoconf, Automake, and Libtool. This will introduce the GNU command line development stack pretty nicely.
Debugging is a lot different being that VS provides a nice GUI debugging environment. Most Linux environments simply wrap a command line debugger (usually gdb) with a GUI. The result is less than satisfactory if you expect a nicely integrated debugger. I would recommend getting comfortable with gdb. There are some decent tutorials for gdb online. Just google for a bunch of them. Once you get a little comfortable, read the online manual for the really neat stuff.
The other choice is to use whatever development environment is packaged with your windowing system or to use something like Eclipse and some C++ plug-in
As for books on the subject, Advanced Programming in the UNIX Environment is a must-read. UNIX Systems Programming is also a good read since it gives you a solid grounding in shells, processes, and what not. I would recommend both the POSIX Programmer's Guide and POSIX.4 Programmer's Guide since they give you a lot of the systems programming stuff.
With all of that said, enjoy your foray into an operating system that really cater to programmers ;)
I'm in the process of making the switch from Windows to Linux right now for a program and so far I have found that man and grep are great. Instead of looking up function prototypes in MSDN (or similar) I just use man.
If I need a code example, greping through an existing project that has some similarities to mine is a great help. Or if there is a project similar enough to warrant this, setting up an LXR of their code-base to more easily facilitate reading really helps a lot.
In general, the open source nature of Linux has been the greatest resource to learning to program on Linux.
Also Stevens' Advanced Programming in the UNIX Environment was a huge boon. But as for IDE's and the like, call me a luddite, but I just like vim and make.
I've learned a lot from Beginning Linux Programming by Matthew and Stones, though it's more C than C++.
I use die.net and lookup at The Open Group's website a lot, http://www.opengroup.org/onlinepubs/000095399/functions/{function}.html. They have much the same information as man. I use SciTE, and have the C API and The Open Group POSIX lookup as hotkeys, as described here.

A free tool to check C/C++ source code against a set of coding standards? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite 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.
Closed 9 years ago.
Improve this question
It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on.
The only tool I know is Vera. Haven't used it, though, so can't comment how viable it is. Demo looks promising.
Google c++lint from Google code style guide.
I'm sure this could help to some degree cxx checker. Also this tool seems to be pretty good KWStyle It's from Kitware, the guys who develop Cmake.
Not exactly what you ask for, but I've found it easier to just all agree on a coding standard astyle can generate and then automate the process.
Try nsiqcppstyle. It's a Python based coding style checker for C/C++. It's easy to extend to add your own rules.
There's a list. There is also a putative C++ frontend on splint.
I have used a tool in my work its LDRA tool suite
It is used for testing the c/c++ code but it also can check against coding standards such as MISRA etc.
Check universalindentgui on sourceforge.net.
it has many style checkers for C and you can customise the checkers.
There is cppcheck which is supported also by Hudson via the plugin of the same name.
Check Metrix++ http://metrixplusplus.sourceforge.net/. It may require some extensions which are specific for your needs.
Check out Abraxas Code Check
http://www.abxsoft.com/codchk_user.html
I'm currently working on a project with another project to write just such a tool. I looked at other static code analysis tools and decided that I could do better.
Unfortunately, the project is not yet ready to be used without fairly intimate knowledge of the code (read: it's buggy as all hell). However, we're moving fairly quickly, and hope to have a beta release within the next 8 weeks.
The project is open source - you can visit the project page, and if you want to get involved, we'd love some more external input.
I won't bore you with the details - you can visit the project page for that, but I will say one thing: Most static code analysis tools are aimed at checking your code for mistakes, and not very concerned with checking for coding guidelines. We have taken a more flexible approach that allows us to write plugiins to check for both "house rules" as well as possible bugs.
If you want any more information, please don't hesitate to contact me.
Cheers,