C ++ cross platform with libcurl

I am a perl developer who has never done client-side programming. I would like to think that I am a pretty good developer, except that I know that my serious lack of knowledge about how desktop programming really takes my confidence.

However, I really want to do some desktop applications.

I want to try to develop a simple program that will connect to my server and capture the rss channel and then display it on the console. My attack plan is to use libcurl (and curlpp) to grab the feed (I would also like to do more twisting in the future). But I want to be able to run this small program on linux, windows and mac, because I want to understand how the cross platform is developing.

So, here is the question (and I know this is extremely noobish): How to write C ++ code that will use libcurl and curlpp and will work on 3 main OS? The main thing I do not understand is, should I compile libcurl and curlpp, then how does it work, trying to pass it to other platforms?

+3
source share
3 answers

You need to write the code portable - basically make it a console application. Then you transfer the source code (not exe) to other platforms and compile it there and link it to the llibcurl version on each particular platform.

+3
source

Neil is right, but using a framework will make your life easier. Try QT , it is very nice. It has a cross platform API and integrates curl.

0
source

Qt4, , gcc- Windows Linux Qt4/OpenSSL Windows, , . http://www.limitlessfx.com/mingw-openssl-qt4-for-windows-on-linux.html

libcurl , Qt4.

0
source

Source: https://habr.com/ru/post/1724998/


All Articles