Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Poco library in Visual Studio 2010?

It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests.

First of all, where do I add poco files, somewhere in my project perhaps?

Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use?

If someone could provide me a step-by-step guide, I'd really appreciate it.

Thank you.

like image 585
Simon Avatar asked Jan 11 '13 00:01

Simon


People also ask

How do I install Poco library?

in the cmake-build directory to install POCO to /usr/local . The install directory can be changed by passing the -DCMAKE_INSTALL_PREFIX=/path/to/directory option to CMake during the configuration step. See the top-level CMakeLists. txt for a list of supported options for enabling and disabling specific libraries.

How do I add an external library to Visual Studio?

For adding libraries, this is very simple (if that's what you mean) Project -> properties -> configure properties -> Linker -> Input -> additional libraries. Go stand on one of the libraries in there and press enter.

How do I add a library in Visual Studio 2017?

To create a static library project in Visual Studio 2017On the menu bar, choose File > New > Project. In the New Project dialog box, select Installed > Visual C++ > Windows Desktop. In the center pane, select Windows Desktop Wizard. Specify a name for the project—for example, MathLibrary—in the Name box.


1 Answers

Are you referring to POCO C++ Libraries and Tools? If so,

  1. Download POCO C++ libraries here
  2. Extract(eg: extract to C:\poco-1.4.6)
  3. Find appropriate solution file and build.

    • build_vs71.cmd ==> Visual Studio .NET 2003
    • build_vs80.cmd ==> Visual Studio 2005
    • build_vs90.cmd ==> Visual Studio 2008
    • build_vs100.cmd ==> Visual Studio 2010
    • build_vs110.cmd ==> Visual Studio 2012
      For more info about visual studio versions
      For example, if you want to use poco lib in Visual Studio 2005 Project, you need to build with build_vs80.cmd.Once you have built successfully, you can see all poco static lib in {POCO Folder}\lib. (eg: C:\poco-1.4.6\lib)

  4. Create new project in visual studio and add header path to Project->Properties->C/C++-> Additional Include Directories(eg: If you want to use POCO Foundation, add "C:\poco-1.4.6\Foundation\include")
  5. Add POCO lib path to Project->Properties-> Linker-> General-> Additional Library Directories. (eg: C:\poco-1.4.6\lib)
  6. Add POCO lib files names to Project->Properties->Linker->Input-> Additional Dependencies (eg: PocoNetd.lib )
  7. Now you can start using POCO libraries in your project.

You may also want to check POCO HTTP sample projects which are located at {POCO Folder}\Net\samples. (eg: C:\poco-1.4.6\Net\samples)

like image 130
Linn Htoo Avatar answered Sep 18 '22 17:09

Linn Htoo