This page is intented for users to contribute their findings about building cppunit.

'''Contents'''
[[TableOfContents]]

= General Notes =
See INSTALL in the source package.

== UNIX-like systems ==
UNIX-like systems include Linux, AIX, and CygWin.  Under Linux, you may want to check if your distribution has a cppunit package.

 * Download the file (i.e., cppunit-1.11.2.tar.gz) to /usr/local/src or /usr/src, and change to that directory
 * Run the following: {{{
tar zxpvf cppunit-1.11.2.tar.gz  # Unpack the source
less INSTALL-unix                # Look for configuration options
./configure                      # Generate the makefiles
make                             # Compile
make check                       # Compile and run tests
make install                     # Install libraries, headers
}}}

== Microsoft Visual Studio ==
See INSTALL-WIN32.txt in the Use src/Cpp``Unit``Libraries.dsw

= Specific Platforms =
Here are user notes for specific platforms:

##The format is
## == Platform, compiler version ==
##{{{
##./configure specific options (if any)
##}}}
## * Notes concerning encountered issues. Please state if make; make check does not work.

== SunOS 5.8, CC 5.5 ==
{{{
./configure CXX=CC CXXFLAGS="-mt -xtarget=generic -g -features=no%transitions -xildoff" LD=CC LDFLAGS=-xildoff 
}}}
 * make install fail due to the use of 'cp -dpR' (-d is not accepted)

{{{
./configure CXX=CC CXXFLAGS="-mt -xtarget=generic -g -features=no%transitions -xildoff" LD=CC LDFLAGS=-xildoff CC=CC
}}}

== IBM AIX 5.1, VACPP 6.0 ==
{{{
./configure
}}}
 * lots of warning during link (duplicate symbol).

== Cygwin w/ gcc 3.3.1 ==
{{{
./configure
}}}

No errors with 1.10.2 and up-to-date Cygwin.  Documentation is in INSTALL-unix, and is out-of-date (no {{{--disable-shared}}} required on configure step).  GCC now gives pretty names, so {{{--disable-typeinfo-name}}} is not required either.

For autoconfig users, the line for {{{configure.ac}}} is {{{AM_PATH_CPPUNIT(1.10.2)}}}.  The command for aclocal is {{{aclocal -I /usr/local/share/aclocal}}}.  To eliminate the aclocal warning about an underquoted definition of AM_PATH_CPPUNIT, edit {{{/usr/src/local/cppunit.m4}}}, changing line 4 from:
{{{
AC_DEFUN(AM_PATH_CPPUNIT,
}}}
to
{{{
AC_DEFUN([AM_PATH_CPPUNIT],
}}}
== Solaris 2.8 64-bit, gcc 3.3.2 ==
{{{
export CFLAGS="-m64 -mcpu=v9"; export CXXFLAGS=$CFLAGS; ./configure --libdir=/usr/local/lib/sparcv9
}}}

== Borland C++ Builder ==
See http://community.borland.com/article/0,1410,32704,00.html . These instructions were written for Builder 5.x, but there are suggestions for working with 6.x.

== Eclipse ==

Follow these step by step instructions on how to build CppUnitWithEclipse and CDT.

----
== Tru64 ==
Digital UNIX V4.0F  Compaq C V6.3-129 (dtk)(Rev. 1229) 
 
./configure CC='cxx -using_std -pthread -tweak -std strict_ansi' CXX='cxx -using_std -pthread -tweak -std strict_ansi' LD=CXX LDFLAGS=-lm --disable-shared

[[Anchor(windows)]]
== Microsoft Visual C++ .NET ==
''Don't use UNIX build tools - load Cpp``Unit``Libraries.dsw''

 * The DSPlugin does not build for .NET (It works for MSVC 6 only)
 * If you want build integration (being able to double click on errors) base your test application on 'simple' from the examples. Then add a post buidl step (Properties -> Build Events -> Post-Build Step) of "$(Target``Path)". This will give you output like 
{{{
------ Build started: Project: simple, Configuration: Debug Win32 ------

Linking...
Performing Post-Build Event...
ExampleTestCase::example : assertion
ExampleTestCase::anotherExample : assertion
ExampleTestCase::testAdd : assertion
ExampleTestCase::testDivideByZero : error
ExampleTestCase::testEquals : assertion
v:\shared\rsunit\cppunit-1.10.2\examples\simple\exampletestcase.cpp(7) : error : Assertion
Test name: ExampleTestCase::example
equality assertion failed
- Expected: 1
- Actual  : 1.1
v:\shared\rsunit\cppunit-1.10.2\examples\simple\exampletestcase.cpp(15) : error : Assertion
Test name: ExampleTestCase::anotherExample
assertion failed
- Expression: 1 == 2
v:\shared\rsunit\cppunit-1.10.2\examples\simple\exampletestcase.cpp(27) : error : Assertion
Test name: ExampleTestCase::testAdd
assertion failed
- Expression: result == 6.0
##Failure Location unknown## : Error
Test name: ExampleTestCase::testDivideByZero
uncaught exception of unknown type
v:\shared\rsunit\cppunit-1.10.2\examples\simple\exampletestcase.cpp(51) : error : Assertion
Test name: ExampleTestCase::testEquals
equality assertion failed
- Expected: 12
- Actual  : 13
Failures !!!
Run: 5   Failure total: 5   Failures: 4   Errors: 1
Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."
}}}
every time you compile. You can double click on the errors to have .NET take you directly to the test that failed.

== Microsoft eMbedded Visual C++ v4 (eVC4) ==
''Don't use UNIX build tools - load Cpp``Unit``Libraries.dsw''''

Multiple errors when built with STLport v5.0RC2, 
eg. {{{_construct.h(119): error C2665: 'new': none of the 2 overloads can convert parameter 2 from type 'stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::> *'
   _deque.h(649): see reference to function template instantiation 'void stlp_std::_Copy_Construct(stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::> *,const stlp_std::basic_string<cha
r,stlp_std::char_traits<char>,stlp_std::> &)' being compiled}}}

Can anyone help on this?

''Please post the full set of build errors: attachment:msevc_errors.txt''

== Visual Studio 2005 Express ==

Even using the Microsoft SDK not all the libaries are able to be built. Specifically the test runner won't build. I think this is mainly due to the fact that the SDK does not have some required MFC code. Note that the paid for version of Visual Studio 2005 does manage to build the libraries.

== Microsoft Visual Studio 2005 ==
=== WINCE 5.0 Pocket PC SDK ===
1. of course you need ot install the SDK first. ( SDK can be downloaded from Microsoft's website ).

Needs some modification on the source file:

here are the patches apply to 1.10.2 and 1.11.6. 

''patch for 1.10.2: attachment:cppunit-1.10.2-wince.patch.bz2''

''patch for 1.11.6: attachment:cppunit-1.11.6-wince.patch.bz2''

note: I've only tested the 'simple' app, it can be compiled, but can't run under the WINCE 5.0 Pocket PC Emulator.

after applying those patches, you also need to modify some setting of the VS2005.

Choose the menu 
{{{
Tools->Options
   Project and Solutions
     -> VC++ Directories
   choose the Platform as Windows Mobile 5.0 Pocket PC SDK
   choose Show directories for: Include files
   add your cppunit's include directory into the below list.
   for example: 
   C:\cppunit-1.10.2\include
   or 
   C:\cppunit-1.11.6\include
   
}}}


to test the 'simple' app, right click on the simple project, click Set as Startup Project,
then you can deploy the program to the emulator.
