I have no expirience with C++, and I need to develop a plugin for an app written on C++ (for both its Windows and MacOS versions). The question is: what c++ lib dealing with HTTP(availible on Mac and Windows) you recomend to work with? Note that I do not need some extra functionality, simplicity is much more important.
Thank you in advance.
You can also use cpp-netlib
http://curl.haxx.se/libcurl/
libcurl is a C-based library that has a reasonably simple API that can be used from C++ as well.
Related
I want to use this library for cross platform networking.
http://lacewing-project.org/
It works with OSX, Linux, Windows and has specific code for Android. What I do not know is if it will work (as a client) on iOS. (meaning I will not host a server on iOS)
Since it uses POSIX sockets internally does that make it compatible with iOS?
Thanks
Without trying it, my guess would be that it would work. You will need to write your UI in Objective-C, but you should be able to use Objective-C++ to bind your libraries to the UI. Before you start into the Objective-C++ path be aware of the limitations (see: How well is Objective-C++ supported?).
I would try using the objective-c library AFNetworking first, from the creators of gowalla.
You can get it here:
https://github.com/AFNetworking/AFNetworking
On the topic of lacewing, it should work fine, as long as it relies upon the BSD sockets API, as I can confirm that it exists on iOS.
If it's only written in C/C++ then no, unless you got a C/C++ SDK for iOS (which AFAIK does not exist publicly). iOS SDK is for Objective-C.
I want to develop a custom window system in c++ that should not depend on win32 library. As an example, Google Chrome has an interface that is not similar to windows own interface. Similarly MPCstar and adobe products have their own interfaces. Please help me where to start for such a project?
You can use cross platform
Qt
or
wxWidgets
but in my opinion Qt is better.
Qt is awesome even if you don't need cross platform support. I assure you after using it you won't understand how anyone could ever develop native GUI on frameworks like Win32 and MFC. Its only shortcoming is the size of the DLLs you'll have to distribute with your app.
BTW is C++ a prerequisite? if not, and you only need windows, use .Net.
I believe Qt should do the trick. I've never used it myself but it is platform independent. I know a few applications that use it, and it seems fine.
Qt and WxWidgets are the better options. And since its GUI I think Qt performs better and has greater support and lots of libraries.
Find Qt here!
I have this C# client that's handling xml and tcp/ip messages, and I have to convert it to C++, BUT - I have to convert it to C++ in such a way that it will run on both Windows and Linux. Is there a set of standard libraries for xml and tcp/ip that I can use on both Windows and Linux? Sorry if this sounds like a stupid question - I'm very familiar with C# and .NET, but I'm not very familiar with native C++ - I don't really know any of the standard libraries, just the syntax.
In case it helps, here's the exact message from the boss.
1) read/create very simple XML, and
2) receive/send TCP messages from C++ using a library that exists on both Windows and Linux. Hopefully there is one and you can then develop on Windows and just do a quick test on Linux.
Qt will do what you want.
TCP Sockets
XML Parsing
Also seconding Dani's suggestion that you might as well try to run C# applications on Mono before porting to C++.
The Qt framework not only provides graphical toolkits, but also a C++ framework for portable network applications (same code using Qt should work on Windows, Linux, MacOSX), notably thru its QtNetwork module. (You can use Qt without any graphics involved).
Themel has already answer this. I just want to help with this answer.
When i was implementing this in QT4 it gives error: QtNetwork and QTWidget not found. To solve this error in QT4 -
1. remove #include and add #include
2. add QT += network in your project (.pro) file.
I am looking for a cross platform Library in C++ that can run a web server.
Does any one know if tntnet can work on windows computers.
or libmicrohttpd
POCO has a HTTP server, among lots of other useful stuff. Runs on Windows, Linux, etc.
Currently tntnet does not support windows. It is possible to port tntnet to windows but nobody has done the work. Sorry.
The boost.asio library documentation includes several example HTTP servers
http://www.boost.org/doc/libs/1_42_0/doc/html/boost_asio/examples.html
I fond these extremely useful in developing an embedded web server for my own applications.
This might not answer your question directly, but if you have your heart set on one of those, you could always compile them in cygwin.
I am a perl developer that has never went into the client side programming of things. I'd like to think that I'm a pretty good developer, except I know that my severe lack of knowledge of the way desktop programming really takes away from my credibility.
That said, I really want to get into doing some desktop applications.
I want to try to develop a simple application that will connect to my server and grab an rss feed, then display it in the console. My plan of attack is to use libcurl (and curlpp) to grab the feed (I'd also like to do more curl stuff in the future). But I want to be able to run this small program on linux, windows, and mac because I want to understand developing cross platform.
So here is the question (and I know it is extremely noobish): How do I write c++ code that will use libcurl and curlpp, and will work on the 3 major OSes? The main thing I don't understand is if I have to compile libcurl and curlpp, then how does it work when trying to take it over to the other platforms?
You need to write the code portably - basically make it a console application. You then transfer the source code (not the exe) to the other platforms and compile it there and link with the version of llibcurl on each specific platform.
Neil is right, but using a framework will make your life easier. Try QT it is very nice. It has a cross platform http API, and integrates curl.
I'd recommend Qt4 as well, I've wrote a small'ish tutorial on how to setup a windows gcc compiler on linux and compile Qt4/OpenSSL with it for windows, hope that helps.
http://www.limitlessfx.com/mingw-openssl-qt4-for-windows-on-linux.html
You can easily adapt that tutorial to compiling libcurl instead of just moving to Qt4.