84 lines
3.0 KiB
HTML
84 lines
3.0 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
|
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
|
<meta name="ProgId" content="FrontPage.Editor.Document">
|
|
<title>New Page 1</title>
|
|
<link rel="stylesheet" type="text/css" href="Styles.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h2>64 Bit Build Notes</h2>
|
|
<hr>
|
|
<p>Building Visual Studio workspaces and makefiles that work equally well for 32
|
|
bit x86 and 64 bit IA64 architectures is not an easy task. This
|
|
document outlines some lessons learned in this process.</p>
|
|
<h4>Output Directories</h4>
|
|
<p>Visual Studio by default wants to create different configurations in
|
|
different directories such as Release or Debug. For the purposes of
|
|
simplicity with the sample applications we choose to place the output in a Bin
|
|
directory. It is also important to keep all object files and other
|
|
compiler generated files separated into x86 and IA64 versions.</p>
|
|
<p>For example a project directory tree might look like</p>
|
|
<p>Project<br>
|
|
Bin<br>
|
|
x86<br>
|
|
IA64<br>
|
|
ps_Win32 - IDL Generated Proxy Stub files for Win32<br>
|
|
ps_Win64 - IDL Generated Proxy Stub files for Win64<br>
|
|
Proj1__Win32_Debug<br>
|
|
Proj1__Win32_Release<br>
|
|
Proj1__Win64_Debug<br>
|
|
Proj1__Win64_Release<br>
|
|
</p>
|
|
<h4>Proxy / Stub Issues</h4>
|
|
<p>Proxy / Stub dlls are built with output from the MIDL compiler. The
|
|
default Visual C++ MIDL settings do not output correct IA64 proxy stubs.
|
|
To have correct stubs you must do the following.</p>
|
|
<table border="1" width="100%">
|
|
<tr>
|
|
<td width="50%"><b>Action</b></td>
|
|
<td width="50%"><b>Win32</b></td>
|
|
<td width="50%"><b>Win64</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%">Add MIDL compiler directive</td>
|
|
<td width="50%">/env win32</td>
|
|
<td width="50%">/env win64</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%">Add define for machine type</td>
|
|
<td width="50%">_M_X86</td>
|
|
<td width="50%">_M_IA64</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%">Add output directory</td>
|
|
<td width="50%">/out ps_Win32</td>
|
|
<td width="50%">/out ps_Win64</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%">Add win32 define</td>
|
|
<td width="50%">/D "_WIN32_DCOM"</td>
|
|
<td width="50%">/D "_WIN32_DCOM"</td>
|
|
</tr>
|
|
</table>
|
|
<p> When building a project that includes a proxy stub DLL it is best to
|
|
divide the project into 4 separate projects</p>
|
|
<ol>
|
|
<li>IDL Project - a <i>utility</i> project that contains only the IDL files.</li>
|
|
<li>proxy stub project - a Win32 DLL project that builds the proxy stub using
|
|
the generated files from the IDL project. Depends on the IDL project.</li>
|
|
<li>server project - The COM server.</li>
|
|
<li>client project - The COM client.</li>
|
|
</ol>
|
|
|
|
<h2>MIDL Compiler</h2>
|
|
<p>The MIDL compiler version 6.0 or higher is required.</p>
|
|
|
|
</body>
|
|
|
|
</html>
|