5

I built OpenSSL using the MSVC++ 2013 Express compiler by doing the following:

  • Installing ActivePerl 5.16.3 from here.
  • Grabbing openssl-1.0.1e.tar.gz and extracting it to C:\OpenSSL\Win64.
  • Opening up the "VS2013 x64 Cross Tools Command Prompt" and cd-ing to the directory where I had extracted the archive.
  • Running the following commands:

    perl Configure VC-WIN64A
    ms\do_win64a
    nmake -f ms\ntdll.mak

This completed without errors (the proper DLLs are built). However, something very strange has happened. If I open up openssl/ssl.h, the contents of the file are:

../../ssl/ssl.h

Since this is obviously not valid C/C++, I can't compile any applications that depend on OpenSSL headers due to the problem above. What have I done wrong?

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • 4
    SPECULATION: That file is almost certainly supposed to be a symbolic link - either it has been extracted from the archive improperly, or the build script has somehow created it as a regular file instead of a link. –  Dec 31 '13 at 07:50
  • @duskwuff: Those files seem to be packed like this. Have a look into the linked archive ... - so I'd go for your this-should-be-links proposal. – alk Dec 31 '13 at 07:59
  • What tool are you using to extract the archive? –  Dec 31 '13 at 08:13
  • @duskwuff: I'm using 7-Zip. – Nathan Osman Dec 31 '13 at 08:44

2 Answers2

2

duskwuff's comment was indeed correct. The problem was that 7-Zip didn't properly extract the symbolic links in the archive. The solution was to download GnuWin32's tar command line utility and use that to extract the archive:

tar -xvf openssl-1.0.1e.tar.gz
Community
  • 1
  • 1
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
1

This is not the case of only openssl/ssl.h. This is the case of almost every files which I saw.

I guess that this information is used while building the OpenSSL to generate the include files into the include folder which you mentioned in the makefiles (for Windows, it is nt.mak or ntdll.mak).

If you generate or build the library, you will see in the log that header files are being copied to a folder mentioned in makefile and there you will find the header files which will look like valid C header files. You actually use those generated header files, not this header files.

It looks like a template for generating header files.

doptimusprime
  • 9,115
  • 6
  • 52
  • 90