Weird issue: C1905: Front end and back end not compatible

Hey,

I'm trying to use the OpenSSL library and somehow it works fine except when I try to use AES_Encrypt and AES_Decrypt together. When I use one of them everything is fine, but both of them together generates following issue which i've never encountered before:

1
2
3
4
5
the 32-bit linker (C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\link.exe) failed to do memory mapped file I/O on `lib\Debug\cocos2d.lib' and is going to restart linking with a 64-bit linker for better throughput
8>    LINK : restarting link with 64-bit linker `C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\link.exe'
8>    libtiff.lib(tif_win32.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
8>    LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
8>    LINK : fatal error LNK1257: code generation failed


There is this libtiff.lib in the middle but not sure why this would create issues when using the openssl functions.



Has anyone any idea what might cause this error?

Last edited on
Ofc i did. But the explanation doesn't really make sense to me.
Last edited on
Check the CPU settings on the library and application. The error is reporting a mismatch.
They should both be 32bit,but even if there is a mismatch shouldn't it throw an issue on any call or even when trying to include the .h. It's weired that it only happens when I try to use both functions together, but one alone is fine.
No.

The source and header files are platform independent.

The complier and linker are platfrom dependent, that's where the error will be reported.
Yeah but why would the error only occure when I use those 2 functions.
After checking OpenSSL in GitHub they are both defined in the same source and declared in the same .h. I also haven't build openssl myself, ist provided by seperate Framework as thirdparty lib, is it possbile that I've added it incorrectly to my Project to generate such a error?
Last edited on
Where'd you get the openssl libs? You know you can build it yourself on Windows, right?
yeah i do, but that's what I'm currently trying to avoid, since I would have 2 different openssl libs in my project at the end. I actually on want to under stand this weired issue.
You didn't answer the first question. Where'd you get the openssl libs?
im working with a framework which uses the thridparty openssl lib for HTTP i think internally.
so the lib is provided through the framework.
still haven't really found a solution to this
it works on one computer but it doesn't work on an other pc.

"32bit linker failed to map"
"restarting link with 64-bit linker"

this output is also displayed on the pc where it works, but it seems like the 64 linker just work for this issue there, but i have no idea why it fails on my pc.

and i probably should add that there is a 50% chance that it actually works on my pc when rebuilding everything, but there is just a 50% chance.
Last edited on
There is no solution for this problem. It is not good practice to use libraries from other libraries, and it is not worth the trouble, especially with libraries that are obscure in popularity.

C++ libCurl allows openSSL to be self included from what it seems from here, but sadly it doesn't show the compile settings, which is your actual problem. https://curl.haxx.se/libcurl/c/curlx.html

But then again, libCurl makes you point to where your OpenSSL is directly, and you need to hand compile libCurl anyways (not sure if it has VS binaries).

But from what it looks like, are you really sure that your binaries are not in 64 bit?
Topic archived. No new replies allowed.