LNK errors during built project with libcurl added - visual-studio-2012

I've solved for 2 weeks how to build libcurl project. Finally today I managed it, I followed http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2010.pdf but after I wanted to add libcurl to my own project, it throws lot of LNK errors. So here is code my own project, where I want to add libcurl. It's only for downloading file from url:
#include "stdafx.h"
#include "DlData.h"
#include "curl.h"
//#define CURL_STATICLIB
//#pragma comment(lib, "libcurld")
//#pragma comment(lib, "ws2_32")
//#pragma comment(lib, "Wldap32.lib")
size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
size_t written = fwrite(ptr, size, nmemb, stream);
return written;
};
int _tmain(int argc, _TCHAR* argv[])
{
DlData test;
test.PrintMsg("this is test!");
test.WaitForClick();
//Part for download file
CURL *curl;
ofstream fp;
CURLcode res;
char *url = "http://football-data.co.uk/mmz4281/1415/E0.csv";
char outfilename[FILENAME_MAX] = "C:\\Users\\zdenik\\Documents\\GitProjects\\Predictor\\Files\\";
curl = curl_easy_init();
if (curl)
{
fp.open(outfilename);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
fp.close();
}
cin.get();
return 0;
}
I set my project properties properly (C/C++ - General, Preprocessor, Linker - General, Input) and want to build it as application - exe file. So far I everything went well and I was able to create libcurld.lib which I added to linker in my project properties. After I built it, it throws a lot of LNK errors and it looks like there is no lib added. Here is output:
1>------ Build started: Project: Predictor, Configuration: Debug Win32 ------
1> stdafx.cpp
1> Main.cpp
1> DlData.cpp
1> Generating Code...
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _calloc already defined in LIBCMTD.lib(dbgcalloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgrealloc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __strtoi64 already defined in LIBCMTD.lib(strtoq.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fseek already defined in LIBCMTD.lib(fseek.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _ftell already defined in LIBCMTD.lib(ftell.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isalpha already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isxdigit already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strtoul already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fputc already defined in LIBCMTD.lib(fputc.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memchr already defined in LIBCMTD.lib(memchr.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isalnum already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __lseeki64 already defined in LIBCMTD.lib(lseeki64.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isupper already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _islower already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isprint already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _isgraph already defined in LIBCMTD.lib(_ctype.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info##AAE#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info##AAEAAV0#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __read already defined in LIBCMTD.lib(read.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __write already defined in LIBCMTD.lib(write.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __strnicmp already defined in LIBCMTD.lib(strnicmp.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __close already defined in LIBCMTD.lib(close.obj)
1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __open already defined in LIBCMTD.lib(open.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcurld.lib(easy.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup#8 referenced in function _win32_init
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup#8
1>libcurld.lib(easy.obj) : error LNK2019: unresolved external symbol __imp__WSACleanup#0 referenced in function _win32_cleanup
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__WSACleanup#0
1>libcurld.lib(misc.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(openssl.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(telnet.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError#0 referenced in function _printsub
1>libcurld.lib(tftp.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(asyn-thread.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(select.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(sendf.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(connect.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError#0
1>libcurld.lib(global.obj) : error LNK2019: unresolved external symbol _OPENSSL_add_all_algorithms_noconf referenced in function _libssh2_init
1>libcurld.lib(openssl.obj) : error LNK2001: unresolved external symbol _OPENSSL_add_all_algorithms_noconf
...
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_load_error_strings referenced in function _Curl_ossl_init
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_SESSION_free referenced in function _Curl_ossl_session_free
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_set_session referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_certificate referenced in function _servercert
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_cert_chain referenced in function _verifystatus
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_verify referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_default_passwd_cb referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_default_passwd_cb_userdata referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_check_private_key referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_new referenced in function _cert_stuff
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_free referenced in function _Curl_ossl_close
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_connect referenced in function _ossl_connect_step2
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_read referenced in function _Curl_ossl_shutdown
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_peek referenced in function _Curl_ossl_check_cxn
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_write referenced in function _ossl_send
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_ctrl referenced in function _verifystatus
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_CTX_ctrl referenced in function _ossl_connect_step1
1>libcurld.lib(openssl.obj) : error LNK2019: unresolved external symbol _SSL_get_error referenced in function _Curl_ossl_shutdown
...
1>C:\Users\zdenik\Documents\GitProjects\Predictor\Debug\Predictor.exe : fatal error LNK1120: 213 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
My question is simple. What could be wrong with my project properties settings or how to set libcurld.lib properly?

I finally done it. I downloaded precompiled version of libcurl for Windows 32bit, but before I compiled code, I noticed there is error in char outfilename[FILENAME_MAX] = "C:\Users\zdenik\Documents\GitProjects\Predictor\Files\" row. It is needed to add name of the file at the end of the path string - C:\Users\zdenik\Documents\GitProjects\Predictor\Files\file.csv e.g. It would not cause compile error but app would crash after it's triggering.
After that code compiled successfully.

Related

installing node-webcrypto-ossl on electron project in windows throws error

I am trying to install a module that uses node-webcrypto-ossl in an electron project.
Below is my .npmrc file
target = 4.0.0
arch = x64
target_arch = x64
disturl=https://atom.io/download/electron
runtime = electron
build_from_source = true
openssl_dir = C:\OpenSSL-Win64
python = C:\Users\yalamber\AnacondaTwo\python.exe
Following is the error msg returned
win_delay_load_hook.cc
Creating library D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\Release\nodessl.lib and object D:\ZKPKI\desktop-app\node_modu
les\node-webcrypto-ossl\build\Release\nodessl.exp
main.obj : error LNK2001: unresolved external symbol OPENSSL_init_crypto [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
main.obj : error LNK2001: unresolved external symbol OPENSSL_init [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
key_exp.obj : error LNK2001: unresolved external symbol BIO_new_mem_buf [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
key_exp.obj : error LNK2001: unresolved external symbol i2d_PUBKEY_bio [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
key_exp.obj : error LNK2001: unresolved external symbol d2i_PUBKEY_bio [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
key_exp.obj : error LNK2001: unresolved external symbol i2d_PKCS8PrivateKeyInfo_bio [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\buil
d\nodessl.vcxproj]
key_exp.obj : error LNK2001: unresolved external symbol BIO_s_mem [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
key_exp.obj : error LNK2001: unresolved external symbol d2i_PrivateKey_bio [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
key_exp.obj : error LNK2001: unresolved external symbol BIO_ctrl [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
key_exp.obj : error LNK2001: unresolved external symbol BIO_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol EVP_CIPHER_CTX_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nod
essl.vcxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol BN_CTX_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
scoped_ssl.obj : error LNK2001: unresolved external symbol BIO_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpro
j]
scoped_ssl.obj : error LNK2001: unresolved external symbol EC_GROUP_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol EVP_PKEY_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol ECDSA_SIG_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol EVP_MD_CTX_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
scoped_ssl.obj : error LNK2001: unresolved external symbol EC_KEY_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
scoped_ssl.obj : error LNK2001: unresolved external symbol BN_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj
]
scoped_ssl.obj : error LNK2001: unresolved external symbol RSA_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpro
j]
scoped_ssl.obj : error LNK2001: unresolved external symbol EVP_PKEY_CTX_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodes
sl.vcxproj]
excep.obj : error LNK2001: unresolved external symbol ERR_print_errors [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
digest.obj : error LNK2001: unresolved external symbol EVP_Digest [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
digest.obj : error LNK2001: unresolved external symbol EVP_MD_size [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj
]
rsa_gen.obj : error LNK2001: unresolved external symbol BN_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
rsa_gen.obj : error LNK2001: unresolved external symbol EVP_PKEY_assign [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
rsa_gen.obj : error LNK2001: unresolved external symbol BN_set_word [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpro
j]
rsa_gen.obj : error LNK2001: unresolved external symbol RSA_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
rsa_gen.obj : error LNK2001: unresolved external symbol EVP_PKEY_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
rsa_gen.obj : error LNK2001: unresolved external symbol RSA_generate_key_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol EVP_PKEY_base_id [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_set0_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_get0_crt_params [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_get0_factors [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_set0_factors [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol EVP_PKEY_get1_RSA [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_get0_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
rsa_jwk.obj : error LNK2001: unresolved external symbol RSA_set0_crt_params [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
rsa_jwk.obj : error LNK2001: unresolved external symbol BN_dup [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_DigestVerifyInit [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nod
essl.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_DigestSignInit [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodes
sl.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_DigestVerifyFinal [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\no
dessl.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_DigestSignFinal [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_DigestUpdate [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
rsa_pkcs1.obj : error LNK2001: unresolved external symbol EVP_MD_CTX_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_CTX_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_CTX_ctrl [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_encrypt [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol CRYPTO_malloc [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_decrypt [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_encrypt_init [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nod
essl.vcxproj]
rsa_oaep.obj : error LNK2001: unresolved external symbol EVP_PKEY_decrypt_init [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nod
essl.vcxproj]
ec_gen.obj : error LNK2001: unresolved external symbol EC_KEY_new_by_curve_name [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\no
dessl.vcxproj]
ec_gen.obj : error LNK2001: unresolved external symbol EC_KEY_get0_group [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
ec_gen.obj : error LNK2001: unresolved external symbol EC_GROUP_set_asn1_flag [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
ec_gen.obj : error LNK2001: unresolved external symbol EC_KEY_generate_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
ec_dsa.obj : error LNK2001: unresolved external symbol i2d_ECDSA_SIG [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
ec_dsa.obj : error LNK2001: unresolved external symbol BN_bin2bn [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
ec_dsa.obj : error LNK2001: unresolved external symbol ECDSA_SIG_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
ec_dsa.obj : error LNK2001: unresolved external symbol BN_num_bits [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj
]
ec_dsa.obj : error LNK2001: unresolved external symbol ECDSA_SIG_set0 [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxp
roj]
ec_dsa.obj : error LNK2001: unresolved external symbol BN_bn2binpad [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpro
j]
ec_dsa.obj : error LNK2001: unresolved external symbol CRYPTO_free [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj
]
ec_dsa.obj : error LNK2001: unresolved external symbol ECDSA_SIG_get0 [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxp
roj]
ec_dsa.obj : error LNK2001: unresolved external symbol EVP_PKEY_get1_EC_KEY [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
ec_dsa.obj : error LNK2001: unresolved external symbol d2i_ECDSA_SIG [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
ec_dsa.obj : error LNK2001: unresolved external symbol EC_GROUP_get_order [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EC_GROUP_get_degree [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EC_KEY_get0_private_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EC_GROUP_get_curve_name [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EVP_PKEY_derive [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxp
roj]
ec_dh.obj : error LNK2001: unresolved external symbol EVP_PKEY_derive_init [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EC_KEY_get0_public_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodes
sl.vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol EVP_PKEY_derive_set_peer [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nod
essl.vcxproj]
ec_dh.obj : error LNK2001: unresolved external symbol ECDH_compute_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_GROUP_new_by_curve_name [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\
nodessl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol BN_CTX_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_KEY_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_KEY_set_group [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
ec_jwk.obj : error LNK2001: unresolved external symbol BN_CTX_get [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_POINT_get_affine_coordinates_GFp [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-os
sl\build\nodessl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_KEY_set_private_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
ec_jwk.obj : error LNK2001: unresolved external symbol EC_KEY_set_public_key_affine_coordinates [D:\ZKPKI\desktop-app\node_modules\node-webcryp
to-ossl\build\nodessl.vcxproj]
aes_gen.obj : error LNK2001: unresolved external symbol RAND_bytes [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj
]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_aes_256_ecb [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_CipherFinal_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_aes_192_ecb [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_CipherInit_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_aes_128_ecb [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_CipherUpdate [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.v
cxproj]
aes_ecb.obj : error LNK2001: unresolved external symbol EVP_CIPHER_CTX_new [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
aes_cbc.obj : error LNK2001: unresolved external symbol AES_set_decrypt_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
aes_cbc.obj : error LNK2001: unresolved external symbol AES_wrap_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpr
oj]
aes_cbc.obj : error LNK2001: unresolved external symbol EVP_aes_192_cbc [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_cbc.obj : error LNK2001: unresolved external symbol EVP_aes_128_cbc [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_cbc.obj : error LNK2001: unresolved external symbol AES_set_encrypt_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
aes_cbc.obj : error LNK2001: unresolved external symbol AES_unwrap_key [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcx
proj]
aes_cbc.obj : error LNK2001: unresolved external symbol EVP_aes_256_cbc [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_aes_128_gcm [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_EncryptUpdate [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_aes_256_gcm [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_CIPHER_CTX_ctrl [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_EncryptFinal_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_DecryptInit_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_EncryptInit_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_DecryptFinal_ex [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodess
l.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_aes_192_gcm [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vc
xproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_CIPHER_block_size [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
aes_gcm.obj : error LNK2001: unresolved external symbol EVP_DecryptUpdate [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.
vcxproj]
aes_ctr.obj : error LNK2001: unresolved external symbol CRYPTO_ctr128_encrypt [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\node
ssl.vcxproj]
aes_ctr.obj : error LNK2001: unresolved external symbol AES_encrypt [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxpro
j]
hmac_sign.obj : error LNK2001: unresolved external symbol HMAC [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
pbkdf2_derive.obj : error LNK2001: unresolved external symbol PKCS5_PBKDF2_HMAC [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\no
dessl.vcxproj]
common.obj : error LNK2001: unresolved external symbol BN_bn2bin [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
w_key.obj : error LNK2001: unresolved external symbol RSA_size [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
w_key.obj : error LNK2001: unresolved external symbol EVP_get_digestbyname [D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\nodessl
.vcxproj]
D:\ZKPKI\desktop-app\node_modules\node-webcrypto-ossl\build\Release\nodessl.node : fatal error LNK1120: 116 unresolved externals [D:\ZKPKI\desk
top-app\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
I am not sure what the error is all about but this module fails to compile only when using electron, it installs and compiles fine with just node.
It compiled properly after I added
openssl_1_0_2 = 1
to .npmrc

error LNK2019 linking assimp

I'm trying to get assimp samples to work in VC++ 2010 and I'm getting link errors.
http://assimp.sourceforge.net/lib_html/install.html
I set include and library directories up, copied the assimp.dll to System32 and put 'assimp.lib' to library dependencies.
I can't figure out what I'm doing wrong.
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiTransformVecByMatrix4 referenced in function _get_bounding_box_for_node
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiMultiplyMatrix4 referenced in function _get_bounding_box_for_node
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiIdentityMatrix4 referenced in function _get_bounding_box
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiTransposeMatrix4 referenced in function _recursive_render
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiImportFile referenced in function _loadasset
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiDetachAllLogStreams referenced in function _main
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiReleaseImport referenced in function _main
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiAttachLogStream referenced in function _main
1>Sample_SimpleOpenGL.obj : error LNK2019: unresolved external symbol _aiGetPredefinedLogStream referenced in function _main
1>Debug\SimpleOpenGL_Debug.exe : fatal error LNK1120: 9 unresolved externals
Add lib files to Linker -> General -> Additional Library Directories then add assimp.lib to Linker -> Input -> Additional Dependencies
Reference

error lnk2019: unresolved external symbol __imp_ fftw_plan_dft_r2c_2d referenced in function in .obj file

Error 4 error LNK2019: unresolved external symbol __imp_fftwf_cleanup referenced in function "int __cdecl ace_enhance_image_interp(float *,float const *,int,int,float,char const *,int)" (?ace_enhance_image_interp##YAHPEAMPEBMHHMPEBDH#Z)
Error 3 error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan referenced in function "int __cdecl compute_omega_trans(float *,float *,int,int,char const *)" (?compute_omega_trans##YAHPEAM0HHPEBD#Z)
Error 1 error LNK2019: unresolved external symbol __imp_fftwf_execute referenced in function "int __cdecl compute_omega_trans(float *,float *,int,int,char const *)" (?compute_omega_trans##YAHPEAM0HHPEBD#Z)
Error 6 error LNK2019: unresolved external symbol __imp_fftwf_free referenced in function "int __cdecl ace_enhance_image_interp(float *,float const *,int,int,float,char const *,int)" (?ace_enhance_image_interp##YAHPEAMPEBMHHMPEBDH#Z)
Error 5 error LNK2019: unresolved external symbol __imp_fftwf_malloc referenced in function "int __cdecl ace_enhance_image_interp(float *,float const *,int,int,float,char const *,int)" (?ace_enhance_image_interp##YAHPEAMPEBMHHMPEBDH#Z)
Error 2 error LNK2019: unresolved external symbol __imp_fftwf_plan_r2r_2d referenced in function "int __cdecl compute_omega_trans(float *,float *,int,int,char const *)" (?compute_omega_trans##YAHPEAM0HHPEBD#Z)
Error 7 error LNK1120: 6 unresolved externals
These are the errors im getting when trying to build the code?can some one please help me..
I linked the libraries correctly..I followed this page and did all which is said here... http://liuxingguang.blogspot.in/2012/05/use-fftw-in-c.html

fatal error LNK1120: 1 unresolved externals

how can i solve this ,when i compile my source im got this error
Neuz.exe : fatal error LNK1120: 1 unresolved
EditString.obj : error LNK2019: unresolved external symbol "public: void __thiscall CEditString::ParsingString(char const *,unsigned long,unsigned long,unsigned short,class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > &,class CDWordArray &,class CByteArray &,class CWordArray &,unsigned long)" (?ParsingString#CEditString##QAEXPBDKKGAAV?$CStringT#DV?$StrTraitMFC#DV?$ChTraitsCRT#D#ATL#####ATL##AAVCDWordArray##AAVCByteArray##AAVCWordArray##K#Z) referenced in function "public: void __thiscall CEditString::AddParsingString(char const *,unsigned long,unsigned long,unsigned short,unsigned long)" (?AddParsingString#CEditString##QAEXPBDKKGK#Z)
If the class CEditString is implemented in one of your source files then add the source file to your project.
If the class CEditString is implemented in a library (.LIB) then add the library to your project.
If the class CEditString is implemented in a DLL then add the import library to your project.
In the latter two cases verify that you have included the correct and unchanged header files matching the exported symbols. You can use dumpbin to see the exported symbols of the LIB and the DLL.

Qt 4.8.2 + vs2010 + static + project build issues LNK2019 & LNK2005

I had successfully compiled a static version of qt4.8.2 by following the instructions from this post http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/
However, I encountered a list of errors when compile my project, they are LNK2019 & LNK2005 related.
I attached the error messages at the bottom.
For the LNK2005 related errors , I included LIBCMT at Linker->Input->Ignore Specific Default Libraries, and its related errors disappear from the error list, but is that the right way to do it?
For the LNK2019 related errors, I couldn't resolve them, please give me some instructions.
Here is my project settings:
C/C++ -> Code Generation -> Runtime Library: Multi-threaded Debug (/MTd)
C/C++ -> Language -> Treat WChar_t As Built in Type: No ( /Zc:wchar_t- )
Linker-> Input -> Additional Dependencies:
Imm32.lib
Ws2_32.lib
winmm.lib
qtmaind.lib
QtCored.lib
QtGuid.lib
wsock32.lib
LNK2019 related error messages:
- Error 161 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __thiscall
QString::toStdString(void)const "
(__imp_?toStdString#QString##QBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
referenced in function "private: void __thiscall
MainForm::on_actionConfiguration_triggered(void)"
(?on_actionConfiguration_triggered#MainForm##AAEXXZ) C:\Working\ProjLocation\test\mainform.obj test
- Error 163 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class QString & __thiscall
QString::append(char const *)" (__imp_?append#QString##QAEAAV1#PBD#Z)
referenced in function "private: void __thiscall
MainForm::summaries_series(struct series const *)"
(?summaries_series#MainForm##AAEXPBUseries###Z) C:\Working\ProjLocation\test\mainform.obj test
- Error 162 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall QString::QString(char const
*)" (__imp_??0QString##QAE#PBD#Z) referenced in function "private: void __thiscall MainForm::on_actionLogin_triggered(void)"
(?on_actionLogin_triggered#MainForm##AAEXXZ) C:\Working\ProjLocation\test\mainform.obj test
LNK2005 related error messages:
- Error 12 error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj) C:\Working\ProjLocation\test\LIBCMT.lib(invarg.obj) test
<more LIBCMT & LIBCMTD related errors…..>
- Error 17 error LNK2005: “void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)” (?_invalid_parameter##YAXPBG00II#Z) already defined in LIBCMTD.lib(invarg.obj) C:\Working\ProjLocation\test\LIBCMT.lib(invarg.obj) test
The default Qt project's properties created by the vs add-in was changed, after I re-compiled the Qt source.

Resources