Changes between Version 26 and Version 27 of BuildingOnWindows


Ignore:
Timestamp:
11/04/10 09:40:38 (13 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnWindows

    v26 v27  
    8484}}}
    8585
    86 ''In theory'' this should work. However, you'll most likely encounter issues with (trivial?) compiler warnings stopping the entire build. To circumvent this remove the ''/WX'' flag in the makefile as suggested in ''INSTALL.W32'' file. This is harder than it seems for two reasons:
    87 
    88  * The correct makefile is ''ms\ntdll.mak'' (not the ''Makefile'' in build root)
    89  * You need to use ''Wordpad'' or other UNIX linefeed-aware editor to open and save the makefile
    90 
    91 You may also encounter issues with an incorrect target processor architecture being used by the linker, especially if you're building OpenVPN on a virtual machine:
    92 
    93 {{{
    94 fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
    95 }}}
    96 
    97 You can check the processor architecture with a tool like [http://www.gtopala.com/ SIW]. Once you know the proper target architecture you need to define it manually. If you have integrated OpenVPN to Visual Studio's graphical development environment, you can set in project properties. If you're just running the VC command-line tools, you can either append the correct architecture via [http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx linker options] to the build command-line or define it in environment variables:
    98 
    99  * http://msdn.microsoft.com/en-us/library/wk97ab1b%28v=VS.80%29.aspx
    100  * http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx
    101 
    10286= Preparing the source tree for building =
    10387
     
    148132If you wish to use Windows for OpenVPN development integrating Git with Visual Studio (2008) may make sense.
    149133 
     134= Troubleshooting =
     135
     136== Compiler warnings during OpenSSL build ==
     137
     138When building OpenSSL you're most likely encounter issues with trivial compiler warnings stopping the entire build. To circumvent this remove the ''/WX'' flag in the makefile as suggested in ''INSTALL.W32'' file. This is harder than it seems for two reasons:
     139
     140 * The correct makefile is ''ms\ntdll.mak'' (not the ''Makefile'' in build root)
     141 * You need to use ''Wordpad'' or other UNIX linefeed-aware editor to open and save the makefile
     142
     143== Wrong processor architecture during OpenSSL build ==
     144
     145Second problem you may encounter is incorrect target processor architecture being used by the linker:
     146
     147{{{
     148fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
     149}}}
     150
     151You can check the correct processor architecture with a tool like [http://www.gtopala.com/ SIW]. Once you know the proper target architecture you need to define it manually. If you have integrated OpenVPN to Visual Studio's graphical development environment, you can set in project properties. If you're just running the VC command-line tools, you can either append the correct architecture via [http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx linker options] to the build command-line or define it in environment variables:
     152
     153 * http://msdn.microsoft.com/en-us/library/wk97ab1b%28v=VS.80%29.aspx
     154 * http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx
     155
     156Probably the easiest fix is to set the environment variable from the command-line:
     157
     158{{{
     159c:\openssl-0.9.8o> set LINK=/MACHINE:x86
     160}}}
     161
     162== Linker can't find link.obj ==
     163
     164During OpenSSL build the linker will look for object files from directories specified by environment variable ''TMP'' or ''TEMP''. By default, both are set to ''%USERPROFILE%\Local Settings\Temp''. However, if you have Cygwin installed, the chances are that it has a different idea about where to put temporary files. You can verify this with the ''env'' command:
     165
     166{{{
     167c:\openssl-0.9.8o> env
     168--- SNIP ---
     169
     170TMP=/tmp
     171TEMP=/tmp
     172
     173--- SNIP ---
     174
     175TERM=cygwin
     176}}}
     177
     178Unfortunately these environment variables can't be set manually with ''set'' command.
     179
     180
    150181= External links =
    151182