How to get started using Poco library? - c++

I have the following files which I currently just want to manage to compile successfully. I have looked for a tutorial on how to use Poco, but unfortunately I couldn't find one for a complete beginner (I tried to follow the docs both under linux & eclipse, and win & vs08.)
I would very much appreciate if someone could guide me through the correct use of the Poco library (either under eclipse or vs08.)
edit: found the problem, i didn't specify to the linker the exact libraries, only their search paths.

You could look into how to use the POCO C++ as a static library in eclipse, then you first need to go through the process of building POCO for your architecture using make and the configure script included in the POCO C++.
Next you should be able to find some tutorials on how to include static libraries (and headers) in eclipse VS.
There are plenty of sources on the internet. For example their forum and this example

Related

How to build an external C++ library to use with R/Rcpp (e.g. Boost)

I can't seem to find anything on the internet which show you how to build and compile a C++ library such that it can be used in R via the Rcpp package. I am missing some steps where the library is somehow linked to R tools
For instance how do you get the boost library working with R or any other such library?
Normal instructions:
https://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/
https://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#or-build-from-the-command-prompt
This is almost surely a duplicate but I am in-between tasks and cannot search now...
"It's still complicated" but Rcpp 1.0.5 now also ship this arXiv paper I wrote on this as this vignette. In short, you need to differentiate between
header-only you can ship or include
small-ish library you include and build
an external library
The third one is hardest as you now have the problem of getting it to CRAN and your users.

Create a fully static Libcurl library

First I'll explain the big picture :
I am creating an application where I separated most of the features in different libraries. One of them contains some classes that use curl. I actually use Ubuntu 64 bit to develop and test it, but my production environment is a NAS with an ARM processor. I intend to, later, also make it for windows.
Where I am now :
My application is running on linux and the ARM-based NAS. However, I don't link with curl, I use curl from command-line internally to do what I need. This has some drawbacks :
As a programmer, I consider it an ugly practice. I should link to libcurl, this is the normal and clean way of using features from other software components.
This implies that curl executable is installed on the target. Not only I don't want to rely on this but also after a system upgrade on the NAS, I found out that I can't rely anymore on this.
What I want
As I intended anyway to use curl as a library, I first tried to do it the "soft way" : dynamic linking. Although it worked on my development environment, it didn't work on the production one because I found out that the curl library installed there doesn't work as expected.
So my next try was using libcurl as a static library. I also considered it to be the best future-proof option for me as it would make sure that, either on the NAS or on any other system, the library I will be using will always be the same.
The problems I've solved so far
Including a static library in another static library
This is already well documented in other answers here in StackOverflow : How to merge two "ar" static libraries into one
I did this to create a combined library of my own one and libcurl and as far as I've checked, it worked.
Building libcurl statically from source
There also are other answers that cover this topic, and I managed to create a libcurl.a that has libcurl features only.
The problems I am still trying to solve
Building libcurl statically with all its dependencies
There are some information regarding this, for example here. I did what was suggested, calling the configure script with --disable-shared and --enable-static. I also did the "rm src/curl" before make and called make with LDFLAGS=-all-static, but the resulting libcurl still missed its dependencies (openssl, pthreads, zlib...).
If I could solve this problem, it would answer my question. But not having succesfully done that, I tried another approach :
Manually merging all libcurl dependencies in a final lib
As I did for merging my library with libcurl into a new library, I also tried do add to it curl dependencies : zlib and openssl. So I compiled both from source to create static libraries and included them in the merge. I was not able to fully check the result as it seems that another one is missing : pthread. And I was not able to find pthread for downloading - compiling - static linking.
Looking at the big picture, my main problem is : how to I include curl in my final application so that there is no external dependency to it?
I think that if either of my two remaining problems would be solved, I would be solving my main problem. But if it is not the case, I also would be glad to hear from someone who knows a better way of solving this, or ideally already solved a similar issue.

Is there any way to extract Boost Regex so I can package it with my project?

I'm working on a project written in C++ that uses the Boost Regex library to do some parsing. My problem is, I need to run the program on a remote machine that doesn't have the boost library installed. I also don't have admin access to this computer so I can't just install it myself.
Is there any way to separate out just the Boost Regex library so that I can put it in the same directory as my other code? I tried doing this already by downloading the boost library and separating out all of the unneeded headers and such. I managed to get it to a point where it calmost compiled but it failed at the linking stage.
Is there anything I can do to fix this or will I be forced to rewrite the parsing code?
You can use the Boost.BCP tool to extract a subset of Boost.
include the static library libboost_regex-gcc-1_35.a your list of object files to compile.
1_35 is an older version number on my linux box, you may have a newer library

Sample code for Anymote in C++ version?

Can anyone tell me where to find the resource just like this one
(But I hope this is for C++ !!)
There is a dynamic library under google tv chrome extersion here
This hyperlink tells us how to go Anymote by call C++ libraries through NPAPI under javascript.
Maybe I can follow this page to go under C++ version.
Unfortunately, the arch of these libraries is i386 (or x86_64).
My project build under the other platform (ex: arm), so I can't call these libraries directly. Orz
There is a cpp Anymote library implementation and some unittests which exercise the library APIs at:
http://code.google.com/p/anymote-protocol/source/browse/#hg%2Fcpp
Apart from that there is no open source Anymote client library in C++.

boost library..........pre-built variants?

im just installing the boost library using an installer.
Its asking me which variants (about 8 options, 6 multithreaded and 2 single threaded) do i want to install. Im only installing this to get to grips and have a practice with boost, so im unsure?
Also, how do i use the libraries from VS02010 once ive 'installed' them using the installer?
thank you in advance
Boost documentation is your friend. A read of the information on getting started on Windows would save you much time.
Most of the libraries are header-only. You can use these just by including the correct headers as described in the individual library docs. If you want to use any of the ones that are not, you are going to need either to build your own libraries, or install the ones that come prebuilt. This is what your question pertains to. So you really must answer your own question - what is your target platform, and do you have to support multi-threaded programming? if in doubt, install them all and use the ones you need on a case-by-case basis.
To use the Boost libs once you have installed or built them, just include the relevant library in your project Linker options as for any other static library.