cURL / Mailing Lists / curl-library / Single Mail

curl-library

new project file and README for Visual Studio 2005

From: Klaus Darilion <klaus.mailinglists_at_pernau.at>
Date: Tue, 01 Dec 2009 12:49:09 +0100

Hi!

Attached is an extended version of the Visual Studio 2005 project file
(lib/libcurl.vcproj).

The current project file has the following limitations:
- builds ony static LIBs which depends on Visual C Runtime DLL
- only one platform (win32)
- uses hard-coded output directories and names - thus cumbersome
   to extend

The attached version uses the Visual Studio Macros (e.g. $(OutDir))
instead of hard coded destinations, thus it is much more easy to add new
targets/platforms. The attached version builds:
- static LIBs which depend on Visual C Runtime DLL (like current
   project file)
- static LIBs which do not depend on Visual C Runtime DLL
- above targets for win32 and x64 platform

The libraries will be placed into the following directories:
\
  lib
     \-Debug
     \-Debug_noVCRTdll
     \-Release
     \-Release_noVCRTdll
     \-x64
          \-Debug
          \-Debug_noVCRTdll
          \-Release
          \-Release_noVCRTdll

Attached is also a READM file (which is also part of the project and
thus should be put into lib/ too) which describes the build targets and
how to add new targets.

It would be great if you integrate this new project file and its README.

thanks
Klaus

Libcurl includes a project file for Visual Studio. This project file resides at
lib/libcurl.vcproj and was created with Visual Studio 2005. Thus, you should be
able to use it with Visual Studio 2005 and newer version, which will
automatically convert it into newer formats.
 
This project file supports 4 targets for 2 different platforms.

Platforms:
 - Win32 (x86 32 bit)
 - x64 (64 bit)

Targets:
- Release: Static Release Library with dependency on the Visual C Runtime DLL
- Release_noVCRTdll: Static Release Library without dependency on the Visual C
                     Runtime DLL (VC Runtime will be statically linked)
- Debug: Static Debug Library with dependency on the Visual C Runtime DLL
- Debug_noVCRTdll: Static Debug Library without dependency on the Visual C
                   Runtime DLL (VC Runtime will be statically linked)

The libraries will be placed into the following directories:
\
 lib
    \-Debug
    \-Debug_noVCRTdll
    \-Release
    \-Release_noVCRTdll
    \-x64
         \-Debug
         \-Debug_noVCRTdll
         \-Release
         \-Release_noVCRTdll

You can easily modify the targets or create a new target. For example you want
to build static libraries without dependency on VCRT dll and without LDAP
support (it is a good practice to create a new target instead of changing the
default ones):
1. Build -> Configuration Manager
2. Active Configuration --> Choose <New...>
   Name: for exmaple "Debug_noVCRTdll_NOLDAP"
   Copy Settings from: Debug_noVCRTdll
   (create new project configurations) --> OK --> Close
3. Project --> Properties
   (select the new Debug_noVCRTdll_NOLDAP project if it is not already selected)
   Platform: select "all platforms"
   C/C++ --> Preprocessor --> Preprocessor Definitions: add CURL_DISABLE_LDAP
4. Repeat step 2 and 3 for a Release version without LDAP support
5. Build all the available targets for all platforms:
   Build --> Batch Build --> Select All --> Rebuild

Other targets, e.g. DLL instead of static libraries (Poject -> Properties ->
Configuration Properties: General -> Configuration Type: Dynamic Library (dll))
can be added in similar way.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2009-12-01