问题
I'm trying to make a transition from vb.net to C++ and I'm stuck on this. I downloaded curlpp from here which got me a .dll, .exp and .lib file. I added the directory that contains those 3 files to "Additional Library Directories" in the project properties (Linker -> General).
Next, I added ws2_32.lib and Wldap32.lib to "Additional Dependencies", also in the project properties (Linker -> Input) because this question stated I should.
Now I'm trying to get Example 00 to work, but
#include <curlpp/curlpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
States "cannot open source file curlpp/curlpp.hpp" etc. which makes sense because I have never even seen those files. What am I doing wrong? This is quite different from vb.net and I can't seem to figure it out.
UPDATE:
I did what Mat said, but it didn't work, so I added all relevent folders to be sure.
But VS still states the files can't be found.
回答1:
You should download the full source package (.tar.gz
in the downloads section) to get the headers, code, samples and documentation.
You'll need to add the base directory where the include files reside on your machine (after unpacking the archive) to the list of include directories for your project.
来源:https://stackoverflow.com/questions/7945376/how-do-i-add-curlpp-to-my-project