views:

2210

answers:

2

After following the instructions in INSTALL.W64 I have two problems:

  • The code is still written to the "out32" folder. I need to be able to link to both 32-bit and 64-bit versions of the library on my workstation, so I don't want the 64-bit versions to clobber the 32-bit libs.
  • The output is still 32-bit! This means that I get "unresolved external symbol" errors when trying to link to the libraries from an x64 app.
+4  A: 

To compile the static libraries (both release and debug), this is what you need to do:

  1. Install Perl - www.activestate.com
  2. Run the "Visual Studio 2008 x64 Cross Tools Command Prompt" (Note: The regular command prompt WILL NOT WORK.)
  3. Configure with perl Configure VC-WIN64A no-shared no-idea
  4. Run: ms\do_win64a
  5. EDIT ms\nt.mak and change "32" to "64" in the output dirs:
    # The output directory for everything intersting
    OUT_D=out64.dbg
    # The output directory for all the temporary muck
    TMP_D=tmp64.dbg
    # The output directory for the header files
    INC_D=inc64
    INCO_D=inc64\openssl
  1. EDIT ms\nt.mak and remove bufferoverflowu.lib from EX_LIBS if you get an error about it.
  2. Run: nmake -f ms\nt.mak
  3. EDIT the ms\do_win64a file and ADD "debug" to all lines, except the "ml64" and the last two lines
  4. Run: ms\do_win64a
  5. Repeat steps 4 and 5
  6. EDIT the ms\nt.mak file and ADD /Zi to the CFLAG list!
  7. Run: nmake -f ms\nt.mak
Kurt
A: 

You can also use MSYS+mingw-w64:

1) download and extract msys to C:\msys
2) download and extract mingw-w64 to c:\mingw64
3) run msys postinstall script. When it asks for your mingw installation, point it to C:\mingw64\bin
4) Extract an openssl daily snapshot (1.0.0 release has a bug). In the source dir run configure mingw64
make
make check
make install
5) openssl is installed to /local/

rubenvb