~ubuntu-branches/ubuntu/oneiric/ctemplate/oneiric

« back to all changes in this revision

Viewing changes to README.windows

  • Committer: Bazaar Package Importer
  • Author(s): Florian Reinhard
  • Date: 2010-01-14 22:31:32 UTC
  • Revision ID: james.westby@ubuntu.com-20100114223132-w9ritwjg2av4rfb3
Tags: upstream-0.96
ImportĀ upstreamĀ versionĀ 0.96

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This project has been ported to Windows.  A working solution file
 
2
exists in this directory:
 
3
    google-ctemplate.sln
 
4
 
 
5
You can load this solution file into either VC++ 7.1 (Visual Studio
 
6
2003) or VC++ 8.0 (Visual Studio 2005) -- in the latter case, it will
 
7
automatically convert the files to the latest format for you.
 
8
 
 
9
When you build the solution, it will create libctemplate.dll, the main
 
10
library for this project, plus a number of unittests, which you can
 
11
run by hand (or, more easily, under the Visual Studio debugger) to
 
12
make sure everything is working properly on your system.  The binaries
 
13
will end up in a directory called "debug" or "release" in the
 
14
top-level directory (next to the .sln file).
 
15
 
 
16
If you wish to link to ctemplate statically instead of using the .dll,
 
17
you can; see the example project template_unittest_static.  For this
 
18
to work, you'll need to add "/D CTEMPLATE_DLL_DECL=" to the compile
 
19
line of every ctemplate .cc file.
 
20
 
 
21
Note that these systems are set to build in Debug mode by default.
 
22
You may want to change them to Release mode.
 
23
 
 
24
Currently, Template::StringToTemplate returns a Template object that
 
25
you, the caller, must free.  We've heard reports that Windows can have
 
26
trouble allocating memory in a .dll that is meant to be freed in the
 
27
application.  Thus, we suggest you not use StringToTemplate from
 
28
Windows.  Instead, you can use Template::StringToTemplateCache()
 
29
followed by Template::GetTemplate().
 
30
 
 
31
I have little experience with Windows programming, so there may be
 
32
better ways to set this up than I've done!  If you run across any
 
33
problems, please post to the google-ctemplate Google Group, or report
 
34
them on the google-ctemplate Google Code site:
 
35
   http://groups.google.com/group/google-ctemplate
 
36
   http://code.google.com/p/google-ctemplate/issues/list
 
37
 
 
38
-- craig