We have a project really similar to the one reported in this question where OpenSSL is the starting point of lib B
. When compiling the executable (Exe 1
), the problem is that we are getting some linking issues that seems to be related to OpenSSL linking.
(cryptlib.obj) LNK2019: unresolved external symbol __alloca_probe_16 referenced in function _OPENSSL_isservice
(bss_file.obj) LNK2001: unresolved external symbol __alloca_probe_16
(b_print.obj) LNK2019: unresolved external symbol __ftol2_sse referenced in function _roundv
Compiling the library doesn't give any error whatsoever. I'm curious to know where are located these functions so that I can add the correct references in the project.
I'm running on Windows 7 with a 64 bits proc, if that can make any difference 🙂
Edit1
Those are errors when compiling in Win32 with VS2010.
Edit2
The OpenSSL lib (libeay32.lib) was also compiled with nasm
for VS2010 (for Win32).
Edit3
If someone could point out a link to build OpenSSL with VS2010 (vc2010) or VS2008 compiler, that would also be helpfull (other than pointing to the InstallW** files in OpenSSL)
Edit4
We are also using the Windows DDK 2003, if it can help.
Best Answer
Here are the steps I took to solve the issue :
Solving the __alloca_probe_16 linking error
Since we also have Visual Studio 2008 installed we used some
obj
files to fix this issue.alloca16.obj
is present in four different directories under the Visual Studio 2008 folder (which should be something likeC:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/crt/src/intel/XXX_lib
whereXXX
might bedll
,mt
,xdll
orxmt
. Note that I'm not quite sure what is the difference between any of them).Adding this path to the
Linker > General > Addtionnal Library Directories
under theProperties
panel of the project and adding alloca16.obj to theLinker > Input > Addtional Dependencies
solved the issue.Solving the __ftol2_sse linking error
This one is a little bit tricky. Configuring OpenSSL with
no-sse2
flag seems like it would fix the problem... but not as of version1.0.0d
. I created a new header file which contains this :(as shown on this site)