Framework for a C++ 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 9 years ago.
Improve this question
I want to create a standalone C++ desktop application which will be close-source, commercial and will not require the user to have the required DLLs in the machine.
It has, at least, to work for Windows. If it can be built for all platforms, that would be awesome.
This means I do not want the application to use the .NET Framework and all required DLLs must be shipped with the (only) executable the client will download.
I found and tested a dummy MFC application, it seems possible to do everything I require, but every comment I hear about MFC is that it is bad designed, about to be obsolete, bad choice, hard to use, etc etc etc.
I see lots of people recommend Qt, but I read that I can't ship the library unless I pay a commercial license, or the application has to be open-source.
wxWidgets, from what I read, seems to follow the same bad design of MFC.
However, many of the comments I read seem to be for years ago. It seems that Qt has changed its license, so something may have changed in the meanwhile.
If you were me and had these requirements, what framework/library would you pick and why?

I see lots of people recommend Qt, but I read that I can't ship the library unless I pay a commercial license, or the application has to be open-source.
This is wrong. Qt is available under the LGPL license, which means you absolutely can ship your application closed-source, as long as you provide a way for the end-user to be able to modify/update the Qt dependency. Typically this means using a shared Qt library and deploying the DLL files with your application, so that the end-user can replace the DLL files if they wanted to. However it is also possible to link statically in which case you must provide a way for your end-users to re-link it. This means that you'd have to ship compiled code (object files) with your application as a minimum. Note: I'm not a lawyer, and you should thoroughly investigate the license terms yourself before you make any decision.
However, many of the comments I read seem to be for years ago. It seems that Qt has changed its license, so something may have changed in the meanwhile.
As far as I can tell, Qt added LGPL as one of the available licenses in version 4.5 which was released in March 2009. So yes, those comments are almost 4 years out of date.
Note: Apart from the specific points I've addressed, it is hard to answer your question more generally for two reasons - (1) this site considers posts asking for recommendations to be off-topic, and (2) you've said, "if you were me and had these requirements, what framework/library would you pick and why", but you haven't actually said what those requirements are - it seems apparent that you want the library to be able to do GUIs, but what else? There are many different frameworks and libraries for C++ and they all do different things.

I really don't see what's the problem with Qt. I agree with what JBentley said - it implies that it would be in fact a good choice if you're looking for a modern framework. Qt offers much more functionality than MFC.
There is no problem shipping commercial, closed-source, statically linked applications that use Qt. Been there, done that, and it works just fine. Single .exe is all you provide. I'm not a lawyer, but generally what you need to provide on request is a static .lib file generated from your code's object files, so that it can be re-linked by the end user with their own copy of Qt.
There's nothing bad about that from a commercial standpoint -- if you can't afford the cost of a commercial Qt license, the requirement to make a .lib file if your compiled closed-source code shouldn't be a big deal. Make it a part of your build process, so that it's not an extra burden. You don't need to distribute this .lib file, just provide it on request. It doesn't have to be recompiled for the requester's platform or anything like that - whatever compiler you use to compile Qt and your application is all you need.
If one is serious about it, one will ask an IP lawyer to explain the implications of the licensing terms of any software you intend to redistribute with one;s product. So it doesn't matter if it's Qt or MFC, one goes and asks a lawyer. It's not like somehow LGPL implies "go to a lawyer", but a possibly much more complex Microsoft license doesn't. Unless one's stance is that it's OK to ignore MS licenses, but not OK to ignore FSF licenses :/

Have a look at these: http://en.wikipedia.org/wiki/List_of_widget_toolkits
Maybe SmartWin++? http://en.wikipedia.org/wiki/SmartWin%2B%2B
Cheers

MFC is alive and well and will meet your requirements. I (still) use it frequently. If your app GUI is basic and does not need most of the MFC features then ATL would be a very good choice. Both MFC and ATL can be statically linked so no DLLs need to be shipped with the app.

Related

C++ cross-platform framework for mobile app development [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
I'm planning on developing mobile application for both iOS and Android and I want to use C++ for the development.
Which cross-platform framework is available for building mobile application using the C++ language.
I'm sure a lot of people have this question as well, so read this if you'd really like to know the answer. Marmalade is probably the BEST solution. Code once, deploy to mobile devices, desktops, even some TV's. Many popular games have been created with Marmalade.
Extensive games like:
Lara Croft and the Guardian of Light
Call of Duty: World at War Zombies
But also simple games like:
draw something.
Doodle Jump
They've added a free package. You can create your game for free and if you want to get rid of the ad splash screen, it's $150,- per year for mobile devices or $500,- per year for other devices as well.
A big advantage is the native speed. It doesn't matter what people claim about other languages like javascript or java (and unfortunately Qt, which of course isn't a language but you know what I mean) running as fast as C or C++. It's simply not true. For simple applications this is of course not important, but when you're looking at (simple) games, this is crucial.
At the moment version 7.3 is available, but this version has a problem with the ARM emulator. I would download 7.0.
Whether you choose Marmalade or not, make sure you read the documentation. You don't want to end up missing some functionality and switch to another option when you're almost finished.
I've looked into portable code between Android and iOS before and I don't think it's possible.
To release apps into the Android market it needs to be in Java, and anything with a GUI on iOS needs to use Objective-C.
You might be able to have partial portable C++ layer, but in reality it's probably quicker to write the same app twice in Java and Obj-C than it would be to write it once in C++ as a portable solution.
Qt or Wx-Widgets might have some support, but I have not looked into mobile platforms for these, and I suspect the reality is that Apple, Microsoft and Oracle want you to be tied into their technologies these days and have no incentive to make things portable.
C# and Java provide a complete framework that allows code to be written much quicker using well documented classes and libraries, especially when dealing with user interfaces.
C++ on the other hand relies on many open source projects that take a lot of effort to get functioning on multiple platforms, and much time is spent dealing with subtle platform problems.
My suggestion was simply that it might be easier to pick a language better suited to the platform you are dealing with, as C++ tends to be lower level than other languages, the syntax can seem verbose and many hours can be wasted trying to make things work that you would expect to just work, and unfortunately documentation for many open source projects is poor.
Maybe this can be considered to be an opinion, but then the shift from C++ to C# or Java commercially might also indicate that I'm not the only one believing this.
You can take a look on openFrameworks, maybe it fits on your needs:
http://openframeworks.cc/about/
There ARE solutions for C++ cross-platform development for Android and iPhone, despite what other answers say here.
The best is probably Marmalade, but it's expensive, so only useful for commercially viable apps: https://www.madewithmarmalade.com/
Then there's MoSync, which you can use for free. Unfortunately they went bankrupt last year, so there's no ongoing support. Still, might be worth a look depending on your needs. http://www.mosync.com
OpenFrameworks is one I hadn't seen, so thanks Rodrigo for that answer: http://openframeworks.cc/
There is no cross platform solution using C++, unless you're interested in making games. There are a few options available if you don't mind using another programming language. Take a look at Titanium SDK (Javascript), Xamarin (C#) or the multitude of HTML5/CSS/Javascript frameworks (Phonegap comes to mind).
Look for the DragonFire SDK it allows you to write apps and games in c/c++. Not cross-platform and never used it but looks good. It uses Visual Studio and has its own simulator for iOS development.

C++ Core Application Development framework , Open Source , Cross Platform [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
Like Qt , do we have any core application development framework in c++.
I think the qt is mainly for GUI applications . I need something other than QT , which gives a much faster running code ...
Visual Studio for c++ is a good choice , but its not an open source and cross platform one ..
To put it bluntly, to me it sounds like you're wasting your time and do not have clearly defined goal for your application. No framework can fix this problem. Write down application specification, list of target platform, check what functionality is required but missing, search for existing libraries, then use them.
I think the qt is mainly for GUI applications
You're mistaken.
In Qt 4 GUI component is optional. You are free to design console applications using QCoreApplication instead of QApplication for application object. As a bonus you get access to some GUI-related classes (not all of them, though - many require QApplication).
which gives a much faster running code
Making code run fast is your responsibility. If it runs slowly, then it is your fault until proven otherwise. Qt 4 is very fast, at least as far as GUI performance is concerned. Poor selection of algorithms, abuse of memory allocation routines and many other things can negatively impact performance. Switching to different framework won't fix those. Instead of searching for different tool, profile your code, search for bottlenecks and fix them.
Visual Studio for c++ is a good choice
It is not cross-platform. It is also not a framework - only IDE+compiler.
Cross Platform
Depending on your application you could even develop cross-platform application in standard C++ without any frameworks while using CMake/Scons/Autotools for build process. Unix-like environments have POSIX standard they more or less attempt to conform to, which can be used (on windows it requires cygwin/msys to be functional). Aside from that there's Boost. You could even ditch C++ and switch to scripted language to ensure portability. It all depends n your goals. Since you haven't said what you're writing it isn't possible to recommend anything specific aside from Boost. In addition to boost there are several frameworks (wxWidgets, Fox Toolkit, GTK) that may or may not meet your requirements.
Since it is not exacly clear what you mean by framework you might want to clarify that a bit more. Anyways, I am a happy user of boost as libraries for generic functionality and use eclipse + cdt as IDE to do coding and debugging. Boost, eclipse and the cdt are open source and cross-platform.
Which features should have the framework? How about the BOOST? It's not a framework as QT and wxWidgets, but it has a lot of features like delegates aka signals, threads, inter-process communications, network, etc.

Can I use the QT LPGL 2.1 commercially? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
You might be reading this and about to flag it as a duplicate but wait. It's different from the others. I am wondering if I can use QT, under the LGPL 2.1 license. For single client programs. The programs are only made for one company to use.
Will LPGL be ok?
The basic point of LGPL is that you can freely build anything on top of it as long as you are linking dynamically against the original binaries. Once you modify the library itself, you need to obey LGPL and distribute the code (but only for the library itself).
There are some distribution quirks, but invoking the library installation from your install program was OK.
LGPL license is not about being commercial or not, it's about licensing the source code. In short:
You can keep your own code to yourself
If you modify any of the Qt code, you need to provide the source code of those changes to the client, that "one company" you mention. The modifications need to be licensed under LGPL (which means they can give it to anyone else if they want).
You're saying it's for internal use in one company (I'm assuimg your own - else there'd be two comapnies). That means you're not redistributing, just using. This is perfectly fine: LPGL gives you unrestricted rights to use. LGPL restrictions are only effective when distributing the application.
The precise quote is found in clause 0: "The act of running a program using the Library is not restricted"
Take the License to a lawyer to read. You don't want to violate the terms and then have to say that "stackoverflow said it was ok".

Alternative to MFC [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 8 years ago.
Improve this question
https://stackoverflow.com/questions/149698/what-is-a-good-mfc-starting-book
A lot of the upvoted comments claim there are much better alternatives. I'd like to know what they might be.
My main requirement is that the UI use the native widgets so that our automation software can work. Owner drawn windows are much harder to drive.
I'm not particularly liking the design of MFC so an alternative would be good. Only one I've found is WX, which is the one we've already tried and are considering abandoning. We need something that doesn't force us to fight with a bunch of cross-platform wrapping we don't care about. We're writing a Windows application and marketing doesn't give one single crap about targeting Mac or Linux (yeah, it makes my butt hurt too).
I've looked at the .NET option a little bit. Problem is I don't know much about it but from what I can tell we'd have to use C# to get a lot of the options readily available with MFC. The C++/CLI toolkit doesn't seem to have docking windows on first glance for instance. In fact, a straight up WinFroms option doesn't seem to either. It looks like we'd have to make a WPF project and that doesn't appear to be at all what we really want (and we'd have a huge bunch of crap to learn besides just another toolkit). Moving out of C++ would also require a lot of wrapping and I don't particularly like the results I've seen from automated wrappers.
The other issue I have with the .NET option is that we've got a pretty drawing intense application (in addition to requiring a lot of forms). I know that you can get similar results with JIT languages like .NET but I also know you've got to be a lot more careful to do so. It's an issue I'd like to avoid worrying about at this time.
The other, and probably most important issue with .NET (at least switching languages) is that we've got a huge supply of interface logic that though should be API agnostic, is very much written in C++.
So what are the other options? Do these people really have points or are they just yelling against anything that isn't their favorite language or toolkit?
NOTE:
What is the issue here?? I said specifically that porting to other platforms is NOT even remotely a consideration and that I HAVE TO HAVE something that uses the native widget set so we don't have to completely change everything that testing uses to automate the product!!!! Did anyone actually read my question?
Qt is the only real answer for a C++ based gui toolkit at the moment (at least for full desktop apps). Even for purely windows apps it's worth it - it also has excellent integration with visual studio (get the vs-addin) and is very well documented
wx has some nice points, one being it's very similar to MFC in use, but with Qt going LGPL wx's real advantage has been lost.
Edit
Qt widgets aren't native HOWEVER they do use the native styling APIs so that they are indistinguishable from native widgets - if you use the default styles.
Windows forms will work just fine with C++/CLI. Windows forms also happens to be a wrapper around WIN32 handles.
There's no difference in the capabilities of C#/Windows Forms compared to C++/Windows Forms. (They just compile differently) Just like you can do the same things with C# and VB.NET...
If you're looking for docking windows, there are a number of third party libraries that do this. (Some are open source, some you can buy.) Because of the CLR, you can directly include assemblies written in a different language.
MFC wasn't bad in its day but it is getting a bit old. A good example would be the collections which have been replaced wit the much better STL collections. However you were asking about GUI stuff. There's the WTL (Windows Template Library) which I believe has now been open sourced. Much lighter footprint than MFC but it is designed to work the same way - eg. Most of the classes have the same names and method names.
On the downside I've found documentation relative scant and it doesn't seem to work well with the Visual Studio Wizards. This could be my problem though - getting it work with the VS wizards would be quite important IMHO.
I'm in roughly the same position: large app, native code, using MFC for the front-end. I don't see any really compelling alternatives, or reasons to switch to anything else.
That being said, let me offer an opinion. If I were doing a new project, which needed to preserve/inherit a lot of native code, I'd consider trying to do a WPF front-end with a largely native (C++/CLI) main application. This was done with Visual Studio 2010, and it's mostly performant, so it's at least possible. WPF has some UI benefits, and it might be easier to work on and test (from an automation perspective), since it is CLR code. I'm not sure it would be worth the investment and learning curve, but it's the alternative I would consider for a modern pure-Windows application with lots of native code.
Hope that helps.
To offer something I didn't see mentioned in the other answers:
From the sound of it, your only reason for needing native controls is that automation software. And the only reason for needing that automation software to work is for testing. I would assume some series of automated tests are being used to ensure the software works as intended.
If that's the case, then here is something to consider: There is a reasonably popular design pattern in the C#/WPF realm called Model-View-ViewModel. Without getting into excessive detail here, the basic idea is that you can separate the actual GUI controls (the View) from the code that handles how those controls interact with the rest of the business logic in the application. That code is the so-called ViewModel. Among other things, this lends itself to designs where that ViewModel (and all the rest logic of the application) can be tested through typical unit-testing methods without actually needing GUI controls to be present.
So whatever testing the automation software is used for could potentially be replaced by straight unit-testing code.
However, my own experience in this realm is not nearly as extensive as I would like. So if you consider this at all, I strongly suggest further research. As a start, googling terms like "Model-View-ViewModel" and "MVVM" should eventually yield some more detailed discussions about that part.
I've seen Qt used fairly extensively. I personally have not used Qt, but I see a lot of questions about it, far more than wXwidgets or MFC. I'd start with that.

Lightweight C++ Gui Library [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 want to create GUI applications with C++ on Windows. I have downloaded Qt, and it works well, but it has so much stuff in it and so many header files that I really don't use. It is a nice framework, but it has more than just GUI.
Are there any lighter GUI libraries out there for Windows C++ that is "just GUI"?
FLTK, if you are serious about lightweight.
http://www.fltk.org/
edit:
Blurb from the website:
FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.
I'll add that its mature and stable, too.
Even if wxWidgets is named here already:
wxWidgets!
Its a great and valuable Framwork (API, Class Library, whatever you may call it).
BUT: You can divide the functionality of this library into many small parts (base, core, gui, internet, xml) and use them, when necessary.
If you really want to make GOOD GUI applications, you have to use a GOOD API. wxWidgets is absolutly free (QT is not), only needs a small overhead in binary form, linked as dll or o-file is it about 2Megs, but has to offer all that you ever need to program great applications...
And wxWidgets is much more lighter than QT... and even better... :)
Try it...
JUCE is fairly light weight, it can be as simple as one .cpp & one .h file. (Look at amalgamated JUCE) It doesn't look like a standard windows app however. On the other hand, it is cross platform.
CEGUI is a powerful GUI library but I am not sure (since you did not clarify) what you mean by lightweight. It contains a lot of headers, too, but they are all related to the GUI or the rendering of it. On my computer, the current Release built in default VS2010 Release mode takes about 3 MB in total for the dlls. There are of course assets that take space too, but clearly these may vary depending on your needs. It uses XML and image files in the assets, the images take the most space. It requires a bunch of dlls depending on your requirements (png, jpeg, xml parsing dlls) but they are all quite small in Release. So unless you are irrationally pedantic about having too many DLLs in use, this should be no issue.
It is written in C++ (0.7-1.0 will be based on C99 standard, 2.0+ will be in C++11 standard) and supports dynamic and static linking. Dynamic linking is the supported type on Windows. Static linking on Windows is not recommended for CEGUI.
Here a short summary of features:
Modern (uses STL, XML for its asset files, and internally supports C99 standard for maximum compatibility, after the 1.0 Release it will be using C++11 in the development branch). It also has support for unicode characters and all sort of languages (as can be seen in the samples).
Offers the following widgets out-of-the-box: text fields (scrollable), editboxes, multiline editboxes, spinners, checkboxes, buttons, radio-buttons, tabbed windows, progress bars, scrollable panes, sliders, dropdown-menus (comboboxes), menu bars, layout containers (vertical/horizontal) and more
Published under the Open Source MIT license, one of the licenses offering you the most freedom, you will only need to distribute the license file with the application and that's it
Layouts can easily be created and edited using a WYSIWYG editor written in Python. It is called CEED and is also freely available. It has gone through a lot of testing and is suitable to be used for production. A stable Release has been published and new features are in development for the future. An imageset editor is also available in the same application.
As stated, this is free for commercial use. The only obligation you have is to distribute the license file.
CEGUI is fit for cross-platform use. It officially supports Windows, Linux, Mac OS. It has also been used on iOS and Android. Android is supported in the development branch.
It was originally designed as a GUI library for games but it is also perfect for usage in scientific applications, rendering applications, visualisation. Desktop applications can be done as well. A simple Windows-like skin is available in the default assets.
It has been around for over 10 years, has an active community and is a robust, feature-rich and extensible library.
wxWidgets
IUP is the smallest one i know, both in terms of learning curve, DLL size and features
Try eGui (see here or here) or WTL.
try GTK with Glade3.
Microsoft Foundation Class Library (MFC)
Considering you are looking for a WINDOWS ONLY SOLUTION, (and that wxWidgets has been voted up on this thread) you may want to trade off some lightweight-ness and checkout MFC.
As far as Windows is concerned, MFC and wxWidgets seem to compete neck & neck, but overall, the former is lighter than the latter.
Some PROS:-
MSVC MFC RAD support. Visual Studio arguably provides the best "RAD
tool & GUI lib" combo. The only other "dynamic duo" that comes close
is that of QtCreator & QT. wxSmith doesn't fully support all
wxWidgets components, but it keeps improving. Very Very Rich set of
commercial GUI components.
Free (but proprietary).
Very nice when it comes to databound controls.
Some CONS:-
The day you decide to port to other platforms, you will wish you had gone with a cross platform lib.
Proprietary nature of MFC means you will have to navigate licencing very very carefully. But AFAIK, MFC is free to redistribute in binary form.Here's a nice article touching on the "oil and water" that is "MFC and FLOSS applications". Apparently, they just might mix.
Anyways, appart from MFC, I think the FOX-Toolkit also deserves a mention, but just like FLTK, the major downside is lack of decent IDEs and RAD tools as compared to, say, QT or wxWidgets