user3038079
user3038079

Reputation: 137

C++ How to link LibCurl in Visual Studio 2010

I just downloaded a zip file from LibCurl's official site. In it there are 4 folders: include, bin, lib and samples. I know I need to link my VS2010 project with them. I linked the include folder but I can't find how to link the lib folder. And in it there are files with extension .A. Is this normal? Any help will be appreciated.

Upvotes: 1

Views: 1001

Answers (2)

herohuyongtao
herohuyongtao

Reputation: 50657

Follow the following steps:

  1. Make sure you download the Windows version, not Linux, as @MartinPerry mentioned (as .A is a Linux file).

  2. Add its include folder to your VS2010 include paths: Proprieties > VC++ Directories > Include Directories.

  3. Add its lib folder to your VS2010 library paths: Proprieties > VC++ Directories > Library Directories.

  4. Add all the libs you linked to Linker > Input > Additional Dependencies.

If it still doesn't work, you may also need to:

**5. Add its bin folder to your VS2010 executable paths: Proprieties > VC++ Directories > Executable Directories.


Edit: The above steps should work for many 3rd-party libraries for VS in Windows.

Upvotes: 1

Emil Condrea
Emil Condrea

Reputation: 9963

Under Project Properties -> Linker - > Input - > Additional dependencies

Upvotes: 1

Related Questions