-
Notifications
You must be signed in to change notification settings - Fork 58
/
building-msc.html
121 lines (102 loc) · 5.33 KB
/
building-msc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="main.css" type="text/css">
<style type="text/css">
.menu-building-msc { font-weight: bold }
</style>
<title>wxHaskell - Building - Visual C++</title>
</head>
<body>
<div id="body">
<div class="menu">
<ul>
<li><a class="menu-index" href="index.html">home</a></li>
<li><a class="menu-screenshots" href="screenshots.html">screenshots</a>
<ul>
<li><a class="menu-samples" href="samples.html">samples</a></li>
<li><a class="menu-applications" href="applications.html">applications</a></li>
</ul>
</li>
<li><a class="menu-documentation" href="documentation.html">documentation</a>
<ul>
<li><a class="menu-documentation-license" href="license.html">license</a></li>
<li><a class="menu-documentation-quickstart" href="quickstart.html">quick start</a></li>
<li><a class="menu-documentation-faq" href="faq.html">faq</a></li>
</ul>
</li>
<li><a class="menu-download" href="download.html">download</a></li>
</ul>
</div>
<div class="menu">
<ul>
<li><a class="menu-building" href="building.html">building</a>
<ul>
<li><a class="menu-building-cygwin" href="building-cygwin.html">cygwin</a></li>
<li><a class="menu-building-msc" href="building-msc.html">msc</a></li>
<li><a class="menu-building-macosx" href="building-macosx.html">macosx</a></li>
</ul>
</li>
<li><a class="menu-development" href="development.html">development</a></li>
<li><a class="menu-contribute" href="contribute.html">contribute</a></li>
<!-- <li><a class="menu-dev-download" href="dev-download.html">download</a></li> -->
</ul>
</div>
<div class="text">
<h2>Building wxWidgets and <span class="lib">wxc</span> with Microsoft Visual C++</h2>
<p>The advantage of using Visual C++ is that the resulting libraries are smaller and faster
than the gnu compiled ones. Furthermore, the debug version provides for automatic detection
of memory leaks in the wxWidgets libraries and you get a warning when forgetting to deallocate
wxWidgets objects. The drawback is that the configure scripts are not used and you will need
to set some options manually.</p>
<p>If you want to use Visual C++ Express Edition, <a href="http://msdn2.microsoft.com/express/aa700755.aspx">you must install Microsoft Platform SDK</a> before building wxWidgets or wxHaskell.</p>
<p>We use the wxWidgets provided workspace directly:</p>
<ul>
<li><b>wxWidgets 2.4</b>: Open the <code>$wxwin/src/wxWidgets.dsw</code> workspace.
Select menu "<code>Build/Set active configuration</code>" and select "<code>wxWidgets - win32 release unicode</code>" to build the (static) library. After compilation, you can also select "<code>wxWidgets - win32 debug unicode</code>" to build
the debug version.</li>
<li><b>wxWidgets 2.6</b>: Open the <code>$wxwin/build/msw/wx.dsw</code> workspace. Select
menu "<code>Build/Batch build</code>" and select all configurations by using the mouse and the <code>shift</code> key,
when you click a marker, all configurations are deselected. Next you manually select the "Unicode Release" and "Unicode Debug" versions of all projects and press "Build". Afterwards, press "Save All" to save all your mouse clicking work :-)</li>
</ul>
<p>If you want to use <a href="http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.Db.html">database access</a> and <a href="http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.OpenGL.html">openGL canvas</a>, you must edit <code>$wxwin/include/msw/setup.h</code>'s <code>#define wxUSE_* </code>(* is target feature name) from 0 to 1. </p>
<p>After building wxWidgets, you need to run <code>configure</code> for the wxHaskell library.</p>
<pre>
> cd $wxhaskell
> ./configure --with-msc
</pre>
<p>If you want to use the debug version of the library, use the <code>--wxc-libname</code> option too.</p>
<pre>
> ./configure --with-msc --wxc-libname=wxcd
</pre>
<p>After configuration, first run <code>make</code> command to generate stc_gen.* files.</p>
<pre>
> make
</pre>
<p>Make will stop by following error.</p>
<pre>
> make: *** No rule to make target `out/wxc/wxc-msw2.6.4-0.10.1.dll', needed by `wxc'. Stop.
</pre>
<p>Then go <code>$wxhaskell/wxc</code> directory. Here, you need to adapt the <code>wxc-<em>version</em>.dsp</code> project to reference the correct wxWidgets directory. Open the <code>.dsp</code> file in an editor and replace all occurrences of "<code>..\..\wxWindows-2.4.2</code>" (or "<code>..\..\wxWindows-2.6.4</code>") or by the installed wxWidgets directory, i.e. <code>$wxwin</code>.
</p>
<p>After adapting the project file, you can open the workspace <code>wxc/wxc-<em>version</em>.dsw</code>
and build the release and debug versions of the C wrapper library (if you use wxWidgets 2.6.4, you must choose
"Unicode Release" or "Unicode Debug" instead of choosing just "Release" or "Debug").</p>
<p>And finally! – you can run <code>make</code> in the <code>$wxhaskell</code> directory to build the
Haskell libraries.</p>
<pre>
> cd $wxhaskell
> make
> make install
> make wx
> make wx-install
</pre>
</div>
<div class="status">
<a style="float: right" href="#body">top</a>last update: "Aug 18 2007".
</div>
</div>
</body>
</html>