Hello,
if compiling with __cdecl and linking with libcrypto.a I get linker error messages:
POLINK: error: Unresolved external symbol '__errno'.
POLINK: error: Unresolved external symbol '__imp___iob'.
POLINK: error: Unresolved external symbol '___umoddi3'.
POLINK: error: Unresolved external symbol '___udivdi3'.
POLINK: error: Unresolved external symbol '__imp____mb_cur_max'.
POLINK: error: Unresolved external symbol '__imp___pctype'.
POLINK: error: Unresolved external symbol '__isctype'.
This symbols are listed in PODUMP of the library as
... UNDEF notype external ...
in several *.c sources.
Compiling and linking the same sources in DevCpp IDE, all references are solved.
Therefor my question: What's the matter? Are there some PellesC-Libraries to solve that problem?
Thanks for answer.
BiK
That libcrypto.a is linked against msvcrt.lib or mingw static library ?
If it works in DevCpp it should be linked against MingW I suppose ... :(
Isn't libeay32.lib/ssleay32.lib enough for openssl from here (https://code.google.com/p/openssl-for-windows/) ?
EDIT: 32-bit msvcrt.def/msvcrt.lib for testing static linking with libcrypto.a.
Thank you for answer.
Compiling with difmod.c is ok, but linking now with libcrypto.a and msvcrt.lib conflicts. One only error message:
POLINK: error: Symbol '_fclose' is multiply defined: 'msvcrt.lib(msvcrt.dll)' and 'crt.lib(fclose.obj)'.
Linking with libeya32.lib resolves all externals. But for run it is nessesary also to include libeay32.dll in windows directory.
To avoid to place libeay32.dll in windows or working directory of the exe, I converted libeay32.dll with the import library libeay32.lib to the static library libeay32dll.lib (by means of DLL to LIB 3.0, http://www.binary-soft.com/).
With the linker parameters
-subsystem:windows -machine:x86 -map -release kernel32.lib user32.lib gdi32.lib advapi32.lib wsock32.lib libeay32dll.lib
the exe was built successful.