MinGW g++ creating undefined reference for std::basic_filebuf - c++

i currently try to make JNI bindings for https://github.com/Mojang/leveldb-mcpe which can be found here https://github.com/GoMint/leveldbjni.
Compiling the project with the compile.sh in src/main/c/ hasn't been a problem under linux (ubuntu 18.04). The problem is that when i compile the same project with mingw64 in cygwin (g++) i get linker errors depending on which optimization level i choose.
The windows build script:
#!/bin/sh
CWD=$(pwd)
# First we start by this: you NEED cygwin with installed x86_64-w64-mingw32-g++ for this to work
CXX="x86_64-w64-mingw32-g++"
# We compile with c++0x because leveldb uses it as preferred language level
CXX="$CXX -std=c++0x"
# Some shared library switches
CXX="$CXX -s -shared -fPIC"
# This build should use the libc memcmp instead of the builtin one
CXX="$CXX -fno-builtin-memcmp"
# Since we use a "emulated" windows build chain we need to define that we are windows blue (10)
CXX="$CXX -D_WIN32_WINNT=0x0603"
# Now some leveldb config (telling we are windows and we want the mcpe windows hacks)
CXX="$CXX -DMCPE_PLATFORM_WINDOWS_FAMILY -DOS_WIN -DCYGWIN -DWIN32 -DNDEBUG -DDLLX="
# Some general improvements
CXX="$CXX -O2"
# Includes
CXX="$CXX -I$JAVA_HOME/include/ -I$JAVA_HOME/include/win32/ -I$CWD/leveldb-mcpe/ -I$CWD/leveldb-mcpe/include/ -v"
# We need the zlib.h in a seperate folder (because mojang added it to the wrong folder zlib/zlib.h where the normal import is simply zlib.h)
mkdir -p "$CWD/include/zlib/"
cp /usr/x86_64-w64-mingw32/sys-root/mingw/include/zlib.h "$CWD/include/zlib/zlib.h"
CXX="$CXX -I$CWD/include/"
# Verify that the built cmd is correct
echo $CXX
# Build the windows version
$CXX leveldb-mcpe/db/builder.cc leveldb-mcpe/db/c.cc\
leveldb-mcpe/db/db_impl.cc leveldb-mcpe/db/db_iter.cc\
leveldb-mcpe/db/dbformat.cc leveldb-mcpe/db/filename.cc\
leveldb-mcpe/db/log_reader.cc leveldb-mcpe/db/log_writer.cc\
leveldb-mcpe/db/memtable.cc leveldb-mcpe/db/repair.cc\
leveldb-mcpe/db/table_cache.cc leveldb-mcpe/db/version_edit.cc\
leveldb-mcpe/db/version_set.cc leveldb-mcpe/db/write_batch.cc\
leveldb-mcpe/db/snappy_compressor.cc\
leveldb-mcpe/db/zlib_compressor.cc\
leveldb-mcpe/db/zopfli_compressor.cc\
leveldb-mcpe/db/zstd_compressor.cc\
\
leveldb-mcpe/table/block.cc leveldb-mcpe/table/block_builder.cc\
leveldb-mcpe/table/filter_block.cc\
leveldb-mcpe/table/iterator.cc leveldb-mcpe/table/merger.cc\
leveldb-mcpe/table/table.cc leveldb-mcpe/table/table_builder.cc\
leveldb-mcpe/table/two_level_iterator.cc\
leveldb-mcpe/table/format.cc\
\
leveldb-mcpe/util/arena.cc leveldb-mcpe/util/bloom.cc\
leveldb-mcpe/util/cache.cc leveldb-mcpe/util/coding.cc\
leveldb-mcpe/util/comparator.cc leveldb-mcpe/util/crc32c.cc\
leveldb-mcpe/util/env.cc leveldb-mcpe/util/env_win.cc\
leveldb-mcpe/util/filter_policy.cc\
leveldb-mcpe/util/hash.cc\
leveldb-mcpe/util/histogram.cc leveldb-mcpe/util/logging.cc\
leveldb-mcpe/util/win_logger.cc leveldb-mcpe/util/options.cc\
leveldb-mcpe/util/status.cc\
\
leveldb-mcpe/port/port_win.cc leveldb-mcpe/port/port_posix_sse.cc\
\
io_gomint_leveldb_DB.cpp io_gomint_leveldb_Iterator.cpp io_gomint_leveldb_WriteBatch.cpp leveldbjni.cpp -o ../resources/leveldb-mcpe.dll -lz
Which compiles just fine but gives me this linker error:
/tmp/ccciWZjc.o:env_win.cc:(.text+0xe6f): Warnung: undefinierter Verweis auf »std::basic_filebuf<char, std::char_traits<char> >::_close()«
/tmp/ccciWZjc.o:env_win.cc:(.text+0x1a18): Warnung: undefinierter Verweis auf »std::basic_filebuf<char, std::char_traits<char> >::_close()«
/tmp/ccciWZjc.o:env_win.cc:(.text+0x1b7c): Warnung: undefinierter Verweis auf »std::basic_filebuf<char, std::char_traits<char> >::_close()«
/tmp/ccciWZjc.o:env_win.cc:(.text+0x1da8): Warnung: undefinierter Verweis auf »std::basic_filebuf<char, std::char_traits<char> >::_close()«
/tmp/ccciWZjc.o:env_win.cc:(.text+0x1f0c): Warnung: undefinierter Verweis auf »std::basic_filebuf<char, std::char_traits<char> >::_close()«
/tmp/ccciWZjc.o:env_win.cc:(.text+0x2124): Warnung: weitere undefinierte Verweise auf »std::basic_filebuf<char, std::char_traits<char> >::_close()« folgen
When i remove the optimization level the linker produces this error:
/tmp/ccD8ugVG.o:env_win.cc:(.text+0xa2c): Warnung: undefinierter Verweis auf »std::basic_ofstream<char, std::char_traits<char> >::_close()«

Related

Ubuntu Fortran CoArray: f951: Warning: Nonexistent include directory ‘/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/openmpi’

System:
Ubuntu 22.04.1 LTS (Jammy Jellyfish) 64-bit
Kernel Linux 5.15.0-46-generic x86_64
MATE 1.26.0
Installed packages:
gfortran --> gfortran-11
libgfortran-11-dev
libcaf-mpich-3
libcaf-openmpi-3
libcoarrays-dev
libcoarrays-mpich-dev
libcoarrays-openmpi-dev
Trying to compile a CoArrayFortran program via caf caf01.f90 results in the error
f951: Warning: Nonexistent include directory ‘/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/openmpi’ [-Wmissing-include-dirs]
/usr/bin/ld: -lmpi_usempif08 kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -lmpi_usempi_ignore_tkr kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -lmpi_mpifh kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -lopen-rte kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -lopen-pal kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -lhwloc kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -levent_core kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
/usr/bin/ld: -levent_pthreads kann nicht gefunden werden: Datei oder Verzeichnis nicht gefunden
collect2: error: ld returned 1 exit status
Error: comand:
`/usr/bin/mpif90.openmpi -I/usr/lib/x86_64-linux-gnu/fortran/ -fcoarray=lib caf01.f90 /usr/lib/x86_64-linux-gnu/open-coarrays/openmpi/lib/libcaf_openmpi.a`
failed to compile.
There is a directory /usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/mpich/, maybe this can be used instead, but how to tell the compiler?
Edit1:
$ LANG="C" caf caf01.f90
f951: Warning: Nonexistent include directory '/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/openmpi' [-Wmissing-include-dirs]
/usr/bin/ld: cannot find -lmpi_usempif08: No such file or directory
/usr/bin/ld: cannot find -lmpi_usempi_ignore_tkr: No such file or directory
/usr/bin/ld: cannot find -lmpi_mpifh: No such file or directory
/usr/bin/ld: cannot find -lopen-rte: No such file or directory
/usr/bin/ld: cannot find -lopen-pal: No such file or directory
/usr/bin/ld: cannot find -lhwloc: No such file or directory
/usr/bin/ld: cannot find -levent_core: No such file or directory
/usr/bin/ld: cannot find -levent_pthreads: No such file or directory
collect2: error: ld returned 1 exit status
Error: comand:
`/usr/bin/mpif90.openmpi -I/usr/lib/x86_64-linux-gnu/fortran/ -fcoarray=lib caf01.f90 /usr/lib/x86_64-linux-gnu/open-coarrays/openmpi/lib/libcaf_openmpi.a`
failed to compile.
The compile-command is caf: /usr/bin/caf -> /etc/alternatives/caf -> /usr/bin/caf.openmpi -> /etc/alternatives/caf-openmpi -> /usr/lib/x86_64-linux-gnu/open-coarrays/openmpi/bin/caf. In this last file there are the lines
# Always make extensions module available, user can choose whether to `use` it or not
caf_pre_flags=("${mod_dir_flag}/usr/lib/x86_64-linux-gnu/fortran/")
but no line including gfortran-mod-15.
Edit2:
I made a (symbolic) link
/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/openmpi/
->
/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/mpich/.
The warning about the nonexistent include directory is gone, but the other errors remain:
LANG="C" caf caf01.f90
/usr/bin/ld: cannot find -lmpi_usempif08: No such file or directory
/usr/bin/ld: cannot find -lmpi_usempi_ignore_tkr: No such file or directory
/usr/bin/ld: cannot find -lmpi_mpifh: No such file or directory
/usr/bin/ld: cannot find -lopen-rte: No such file or directory
/usr/bin/ld: cannot find -lopen-pal: No such file or directory
/usr/bin/ld: cannot find -lhwloc: No such file or directory
/usr/bin/ld: cannot find -levent_core: No such file or directory
/usr/bin/ld: cannot find -levent_pthreads: No such file or directory
collect2: error: ld returned 1 exit status
Error: comand:
`/usr/bin/mpif90.openmpi -I/usr/lib/x86_64-linux-gnu/fortran/ -fcoarray=lib caf01.f90 /usr/lib/x86_64-linux-gnu/open-coarrays/openmpi/lib/libcaf_openmpi.a`
failed to compile.
Summing up "Using CoArrays with gfortran at Ubuntu 22.04" worked for me like this:
Installing the packages:
sudo apt-get install gfortran libcoarrays-dev libcoarrays-openmpi-dev libcaf-openmpi-3
Compiling:
gfortran -fcoarray=lib coarray-fortran-program.f90 -lcaf_openmpi
Running:
cafrun -n 3 a.out
(-n 3 = Number of Images) or with option
cafrun -n 3 --oversubscribe a.out
(if there is an error without this option).
cafrun might be replaced with mpirun or mpiexec.

Link dll against static build of QuaZip using Qt5.12 in VS2017

I'm trying to link a .dll against a static builld of QuaZip library to get rid of the quazip.dll dependency at runtine. Since I've ran into a dependency conflict at production because a customer is using other third party applications in the same process where my .dll is uncluded, which are also using the quazip.dll but a legacy version.
My steps were first to statically compile the zlib dependency as instructed in other posts with the ZLIB_WINAPI flag. Then I compiled QuaZip also with the appropriate ZLIB_WINAPI flag and QUAZIP_STATIC. As zlib.h I have used QtZlib/zlib.h header like in this post recommended. In my .dll project I've also tried to set all the mentioned flags (QUAZIP_STATIC seems to be necessary). Now when I try to compile my .dll I get the following errors
1>quazip.lib(zip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_deflate#8" in Funktion "_zipCloseFileInZipRaw64#16".
1>quazip.lib(zip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_deflateEnd#4" in Funktion "_zipCloseFileInZipRaw64#16".
1>quazip.lib(zip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_crc32#12" in Funktion "_zipWriteInFileInZip#12".
1>quazip.lib(unzip.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__z_crc32#12".
1>quazip.lib(zip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_imp__z_deflateInit2#32" in Funktion "_zipOpenNewFileInZip4_64#76".
1>quazip.lib(zip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_get_crc_table#0" in Funktion "_zipOpenNewFileInZip4_64#76".
1>quazip.lib(unzip.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__z_get_crc_table#0".
1>quazip.lib(unzip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_inflate#8" in Funktion "_unzReadCurrentFile#12".
1>quazip.lib(unzip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__z_inflateEnd#4" in Funktion "_unzCloseCurrentFile#4".
1>quazip.lib(unzip.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_imp__z_inflateInit2#16" in Funktion "_unzOpenCurrentFile3#20".
All projects have been build with the /MT flag.
This is my linker command line
/OUT:"builds\qt5\dll\release\.dll" /MANIFEST /NXCOMPAT /PDB:"builds\qt5\dll\release\.pdb" /DYNAMICBASE "qtmain.lib" "Qt5Core.lib" "Qt5Gui.lib" "Qt5Widgets.lib" "Qt5Sql.lib" "Qt5Network.lib" "Qt5PrintSupport.lib" "qwt.lib" "sloperatecppapi.lib" "slgfw.lib" "slgfwwidget.lib" "slcap.lib" "sltrc.lib" "sltrp.lib" "slhmiutilitieslib.lib" "slaesvcadapter.lib" "slfsfilesvcadapter.lib" "sltraceadapter.lib" "slarchiveadapter.lib" "slmd.lib" "slgfwmanager.lib" "slcncversioninfo.lib" "quazip.lib" "setupapi.lib" "wsock32.lib" "ws2_32.lib" "ucrt.lib" "vcruntime.lib" "msvcrt.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DLL /MACHINE:X86 /SAFESEH /INCREMENTAL:NO /PGD:"builds\qt5\dll\release<myapplication>.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"builds\qt5\dll\release<myapplication>.dll.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"S:\hmisl\lib" /LIBPATH:"S:\hmisl\siemens\sinumerik\hmi\osal\ace\lib" /LIBPATH:"S:\hmisl\siemens\sinumerik\hmi\osal\qt\lib" /LIBPATH:".\include\qt5\qwt\lib" /LIBPATH:".\include\qt5\quazip\lib" /LIBPATH:".\include\qt5\modbus\lib" /LIBPATH:".\include\qt5\qtsingleapplication\lib\release" /TLBID:1
I would be grateful for any new tip, because I've been trying this for almost a week now and I'm running out of ideas.
Ok, three days of agony and I have the solution. I recompiled the zlib, this time not using the provided project file in \contrib\vstudio\vc14, but generating my own with CMake. Then QuaZip linked against it with the flag QUAZIP_STATIC. I then set this flag in my project, which uses QuaZip and linked it against the built quazip.lib and its dependency zlibstatic.lib. Now the library is built into my .dll statically and I no longer have to supply the quazip.dll that caused the conflict.

Running openCV 2.4.11 on eclipse (Ubuntu)

I'm a student from germany and for my bachelor thesis I am required to run a programm and later do something with the output it gives me. However, the programm is written by using openCV and I have a lot of trouble configuring openCV on my PC. I already followed a lot of tutorials and I have openCV 2.4.11 installed on my PC correctly (I think).
Now I tried to test my setup using the following code from one of the tutorials:
#include <cv.h>
#include <highgui.h>
using namespace cv;
int main( int argc, char** argv ) {
Mat image;
image = imread( argv[1], 1 );
if( argc != 2 || !image.data ) {
printf( "No image data \n" );
return -1;
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
return 0;
}
I properly told eclipse where my include files and lib files are and which of them to include. I don't get any errors in the code whatsovever.
But when I try and build my project, it won't work. Instead, I get an endless list of errors that lead to being unable to build it.
The errors read like (That's like 0.1 % of them):
templmatch.cpp:(.text._ZN2cv9crossCorrERKNS_3MatES2_RS0_NS_5Size_IiEEiNS_6Point_IiEEdi+0x1158): Nicht definierter Verweis auf `cv::dft(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
templmatch.cpp:(.text._ZN2cv9crossCorrERKNS_3MatES2_RS0_NS_5Size_IiEEiNS_6Point_IiEEdi+0x1c14): Nicht definierter Verweis auf `cv::dft(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
templmatch.cpp:(.text._ZN2cv9crossCorrERKNS_3MatES2_RS0_NS_5Size_IiEEiNS_6Point_IiEEdi+0x1cbd): Nicht definierter Verweis auf `cv::mulSpectrums(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, int, bool)'
templmatch.cpp:(.text._ZN2cv9crossCorrERKNS_3MatES2_RS0_NS_5Size_IiEEiNS_6Point_IiEEdi+0x1cfa): Nicht definierter Verweis auf `cv::dft(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
collect2: error: ld returned 1 exit status
make: *** [DisplayImage2] Error 1
16:04:37 Build Finished (took 660ms)
I googled the "Nicht definierter Verweis" part and found out that it is the german version of "undefined reference". However the solutions offered there did not solve my problem. I had the same problem in windows as well as on a different computer before but people told me it was Window's fault and that I should use ubuntu and all my problems would be gone.
I'm sorry if this was answered before and I just missed it. However I'd really appreciate any help :)
Sorry, not enough reputation to comment, so answering:
Your undefined references are referencing functions (like dft) that are not being called in your code. You might be actually building something different than what you think.
In case it's helpful, here's a skeleton CMakeLists.txt file which will compile a opencv c++ file:
cmake_minimum_required(VERSION 2.8)
PROJECT(yourFileName)
FIND_PACKAGE(OpenCV REQUIRED)
ADD_EXECUTABLE(${PROJECT_NAME} yourfile.cxx)
TARGET_LINK_LIBRARIES(
${PROJECT_NAME}
${OpenCV_LIBS})
ADD_DEFINITIONS(-std=c++11)
If you run this directly through cmake either gui or command then it should work and then at least it will run so you can work out eclipse later..

GLFW and Visual Studio Community 2015

I am new to C++ and want to include in my first project glfw.
I downloaded the 32-bit windows binaries from: http://www.glfw.org/download.html
I copied the include files and the lib files into my project folder. Then I added them in the project properties (additional include and library directories).
My dependencies look like this:
glfw3.lib opengl32.lib freeglut.lib glew32.lib glu32.lib
Additionally I copied the .dll file into .\System32
Now I get the following errors:
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwWindowShouldClose" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwWindowHint" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwTerminate" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwSwapBuffers" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwSetInputMode" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwPollEvents" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwMakeContextCurrent" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwInit" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwGetKey" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
> Fehler LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwCreateWindow" in Funktion
> "_main". BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1
As in the precompiled binaries only visual studio 2010-2013 libraries are included (I assume) I tried to compile it myself. I thought this could cause the errors.
I downloaded the files from "Source Package" . I used the CMake Gui to generate the build. I chose in the configuration "Visual Studio 14 2015" and generated the files. There werde some VC++ files created so I openened them in Visual Studio. I don't know what to do next. I have tried to run the project but I got the message: "Could not start ...\Debug\ALL_BUILD".
Try using VS 2013 instead. Also, please make sure to post English debugger info. I recommend switching to English all together, it makes finding solutions on the internet a lot easier and you'll be more respected as a programmer if you work in English entirely.
If you want to use vs2015 you could try to change toolset from v140 to v120 in project settings (Project->Properties->General->Platform Toolset).
They have already released dynamic and static libraries for v140 toolset. Get them from here: http://www.glfw.org/download.html

linking openssl to visual studio 2013 LNK2019

I'm developing on a visual studio 2013 application and therefore I need to include openssl libraries.
What have I done so far:
I downloaded the precompiled openssl libraries for VS2013 openssl-1.0.1l-vs2013.7z from here: http://www.npcglib.org/~stathis/blog/precompiled-openssl/ (newest stable entry MSVC2013)
included openssl's include dir to C/C++/General/Additional Include Directories
added lib64/libeay32MTd.lib and lib64/ssleay32MTd.lib to Linker/Input/Additional Dependencies
I call openssl headers this way: #include <openssl\pem.h> (as example)
I am using VS 2013 on a 64 Bit Windows maschine with the multithreading runtime library (/MTd). Every time I want to build my project it gives me the following errors:
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_BIO_new_mem_buf" in Funktion "__catch$?decrypt#cipherEngine##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PADH#Z$4".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RSA_private_decrypt" in Funktion "__catch$?decrypt#cipherEngine##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PADH#Z$4".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_PEM_read_bio_RSAPrivateKey" in Funktion "__catch$?decrypt#cipherEngine##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PADH#Z$4".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: class std::basic_string,class std::allocator > __thiscall cipherEngine::rsaPrivateDecrypt(class std::basic_string,class std::allocator >)" (?rsaPrivateDecrypt#cipherEngine##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##V23##Z)" in Funktion ""public: bool __thiscall cipherEngine::alterKey(class std::basic_string,class std::allocator >)" (?alterKey#cipherEngine##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)".
fatal error LNK1120: 4 nicht aufgelöste Externe
Anyone who knows the "missing link"?
When adding external libraries to VS I usually try to include the library source and build them within my own tree. This avoids the problem I think you are seeing, which is that the precompiled library has been compiled with slightly different options than your main project. The different options render the library unusable to you.
If you really don't want to compile the lib within your project, try investigating those symbols further to identify the compile variant.
I forgot to define the class, the function rsaPrivateDecrypt belongs to (shame on me). The second thing was to use the 32Bit libs instead of the 64Bit libs.