Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top