I am trying to use the openssl library for my C++ code. I was able to configurate the include path correctly, but when I compile my program there is still a linker issue -> C:/Users/felix/my_future/PMS_Blockchain_CPP/pms_blockchain/src/Wallet.cpp:77: undefined reference to `EVP_PKEY_CTX_new_id' collect2.exe: error: ld returned 1 exit status
I am using mingw64 inside visual studio code, my task.json looks like this:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${workspaceFolder}\\pms_blockchain\\src\\**.cpp",
"${workspaceFolder}\\openssl\\**.h",
"-o",
"${workspaceFolder}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
I think I have to add a new task for using the .lib files. I am not familiar with configurations like this, it already took me a lot of time to figure out how to create the existing task for compiling. I appreciate your help.