Setting up libCURL for Visual Studio 2010 - Breckon

16 downloads 3346 Views 511KB Size Report
Setting up libCURL for Visual Studio 2010. STEPS 1 and 2 have been pre- configured on the CRANFIELD SoE LAB PCs and at ESTIA. 1. Download ZIP package ...
Setting up libCURL for Visual Studio 2010 STEPS 1 and 2 have been pre-configured on the CRANFIELD SoE LAB PCs and at ESTIA 1. Download ZIP package : http://www.cranfield.ac.uk/~toby.breckon/teaching/dip/rovio/curl-7.21.3-CU2011_01.zip 2. Extract ZIP archive to a given directory. Copy the libCURL directory this archive contains and all of its contents (for personal machines) to: C:\Program Files\libCURL (or alternatively another directory and then replace “C:\Program Files\libCURL” with this directory in all subsequent instructions) Please ensure you do NOT end up with a libCURL\libCURL directory structure. STEPS 1 and 2 have been pre-configured on the CRANFIELD SoE LAB PCs and at ESTIA AT ESTIA CAMPUS USE: “P:\libCURL” in place of “C:\Program Files\libCURL” in the instructions below. 3. Open the Microsoft Visual Studio 2010 Application (select Visual C++ Settings at startup) 4. Open a new (or your current) Project (following any previous instructions): ●

Click into the main code window first.



Now choose from menu "Project" -> "....... Properties" (last menu item).



In the listing, choose Configuration Options->VC++ Directories.



First, select Library files from List Box.

Click the pull down menu expansion button (downward arrow right), select “Edit” and add the following path: C:\Program Files\libCURL\lib\



Click OK to confirm setting.



Now choose Include files in the list box and Click the pull down menu expansion button (downward arrow right), select “Edit” and add the following path: C:\Program Files\libCURL\include\



Click OK to confirm setting.

5. We must additionally add the libCURL library dependencies to the project: ●

Choose "Linker" tab -> "Input" category -> "Additional Dependencies:" in the same dialogue box as before:



Click the pull down menu expansion button (downward arrow right), select “Edit” and add the necessary import libraries: libcurl.lib

The settings for libCURL in Visual Studio are now confirmed.

6. Finally we must ensure that the global system path has the libCURL lib directory in it (to run our programs). THIS HAS ALREADY BEEN SETUP ON SoE / ESTIA PCs (and only needs to be done once). ●

On your PC “Control Panel -> All Control Panels-> System”



Select “Advanced System Setting” -> Advanced Tab -> Environment Variables



Add the following to the entry for system variable called 'Path' with value: C:\Program Files\libCURL\lib;

N.B. You may need to add this setting is existing OpenCV settings here(and in the previous setup steps) if you are also using OpenCV in the same project.

Now we are ready to start writing a program in using libCURL (and OpenCV).