Main  /  Edit  /  History  /   /  Users Area

Notes for Windows users


There are several important differences between Windows and POSIX operating systems that may effect the way you work.

  1. Using DLL instead of ELF shared objects
  2. Debug and Release versions for MSVC

Using DLLs

First of all I strongly recommend using CppCMS as DLL instead of static libraries:

  1. It allows you to use dynamic loadable views
  2. It allows you to switch CppCMS's dll version without recompiling the application, for example due to security update.
  3. It makes it easier to handle dependencies as for example you should not link manually with zlib, pcre and optional openssl or ICU.


When you compile your program to use DLL you must add DLL_EXPORT define at your project level. Such that the code would be compiled with this define.

It should be defined for all source files including dynamically loadable views.

When you are using Visual C++ compiler make sure you are using have "Enable C++ Exceptions" set /EHsc command line argument.

cl /EHsc -DDLL_EXPORT app.cpp cppcms.lib booster.lib

Libraries naming convention

By default, both static libraries and DLL's with import libraries are built, they have following naming conversion:




Make sure you:

Building and using CppCMS under Visual Studio

Visual Studio is the only existing compiler that has incompatible debug and release runtime libraries and require separate compilation and linking of them.

So in order to build CppCMS correctly make sure

My personal recommendation is to create a set of debug and a set of release libraries in some location, let's say:


With all debug versions of libraries like pcre, zlib and so on, for example c:\apps\debug\bin\pcred.dll

And the same for release:


Such that the pcre.dll goes to c:\apps\release\bin\pcre.dll

And then run two separate builds:

For debug, open terminal and run:

cd z:\mybuilds\cppcms-1.0.1\
mkdir Debug
cd Debug
set PATH=c:\apps\debug\bin;%PATH%
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug 
nmake test
nmake install

Then do the same for release, open separate terminal and run:

cd z:\mybuilds\cppcms-1.0.1\
mkdir Release
cd Release
set PATH=c:\apps\release\bin;%PATH%
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release 
nmake test
nmake install

This would make the life much simpler for you.

Troubleshooting | Top | Hello World


CppCMS is a web development framework for performance demanding applications.

Support This Project Logo

Поддержать проект

CppCMS needs You


Main Page

Valid CSS | Valid XHTML 1.0