1

I kind of am struggling with OpenSSL over here. I downloaded the current release 1.0.1 and the compilation itself works. I can even call ./apps/openssl.exe. But when I get to the linking process the linker complains:

/usr/i686-pc-mingw32/sys-root/mingw/lib/libmingw32.a(main.o): In function `main':
/usr/src/mingw-runtime/mingw-runtime-3.20-1/src/mingwrt-3.20-mingw32/main.c:73: undefined reference to `_WinMain@16'

(this is if I use mingw in cygwin, the same error occurs with cygwin itself) This is the cygwin error:

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):(.text+0xba): undefined reference to `_WinMain@16'

Now I found out that this means that it doesn't find a main function, but this couldn't actually be, can it? I mean openssl HAS its main-function. And concerning mingw: I can't find that file it mentions so there could be cause of the error, but libcygwin.a does exist (though I have no idea how to figure out if it has a main function).

So basically I ask: Why does this error occur that only occurs if I don't add a main function. Did I miss something?

Edit: Sorry to have missed that: I am on Win 7 x64 Enterprise

javex
  • 7,198
  • 7
  • 41
  • 60
  • I think you're cutting off too much of the error log. Say `make` again and put what you get on pastebin.com or similar. Don't `make clean`, just tell it to retry the last steps before it failed again. – Warren Young Apr 12 '12 at 16:46
  • I did actually skip the problem so I do not struggle with it any more. Thanks for your comment (which I actually didn't see even though I checked back here). – javex Apr 20 '12 at 09:35

1 Answers1

2

See this for a solution. Steps summarized below:

  1. unpack the .tar with the msys tools and NOT 7-zip.

  2. Use tar -xzf openssl-x.y.z.tar where x.y.z denotes your version.

  3. Then run the commands and it will work like a charm.

James Mertz
  • 8,459
  • 11
  • 60
  • 87
Yu Kobayashi
  • 386
  • 3
  • 6
  • Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – RivieraKid May 04 '12 at 10:28