Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error LNK1120: 40 unresolved externals #142

Open
ua2004 opened this issue Jun 22, 2016 · 1 comment
Open

Fatal error LNK1120: 40 unresolved externals #142

ua2004 opened this issue Jun 22, 2016 · 1 comment

Comments

@ua2004
Copy link

ua2004 commented Jun 22, 2016

I have a problem compiling ursa on Windows 7, Visual Studio 2013, Python 2.7, Open-SSL installed. Here is the output:

[email protected] install path-to-project\node_modules\ursa
node-gyp rebuild

path-to-project\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\Users\username\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
..\src\ursaNative.cc(157): warning C4244: 'argument' : conversion from 'ssize_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: 'argument' : conversion from 'ssize_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(378): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(379): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(686): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(734): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(779): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(826): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(945): warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(1003): warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
win_delay_load_hook.c
Creating library path-to-project\node_modules\ursa\build\Release\ursaNative.lib and object path-to-project\node_modules\ursa\build\Release\ursaNative.exp
ursaNative.obj : error LNK2001: unresolved external symbol RSA_padding_add_PKCS1_PSS [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_free [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_public_decrypt [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol OpenSSL_add_all_ciphers [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol ERR_error_string [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_generate_key_ex [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol EVP_get_digestbyname [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_free [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_num_bits [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_private_encrypt [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_set_word [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol ERR_load_crypto_strings [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol ERR_peek_error [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol OPENSSL_add_all_algorithms_noconf [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BIO_new_mem_buf [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_private_decrypt [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol PEM_read_bio_RSAPrivateKey [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_size [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol PEM_read_bio_RSA_PUBKEY [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol EVP_MD_size [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_new [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_verify [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol PEM_write_bio_RSA_PUBKEY [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol ERR_clear_error [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BIO_new [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_verify_PKCS1_PSS [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol EVP_get_cipherbyname [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol ERR_get_error [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol OBJ_txt2nid [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BIO_ctrl [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_bn2bin [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_new [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BIO_s_mem [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_sign [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol PEM_write_bio_RSAPrivateKey [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BN_bin2bn [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol OpenSSL_add_all_digests [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol BIO_vfree [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol OBJ_nid2sn [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
ursaNative.obj : error LNK2001: unresolved external symbol RSA_public_encrypt [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
path-to-project\node_modules\ursa\build\Release\ursaNative.node : fatal error LNK1120: 40 unresolved externals [path-to-project\node_modules\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd path-to-project\node_modules\ursa
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
[email protected] path-to-project
-- [email protected] -- [email protected]
`-- [email protected]

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\username\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "ursa"
npm ERR! node v6.1.0
npm ERR! npm v3.8.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ursa package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ursa
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ursa
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! path-to-project\npm-debug.log

@davedoesdev
Copy link
Contributor

@ua2004 I had to do this to get ursa to compile on Windows: #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants