Get Value From ASM (Assembly 64-bit) C++ -


i having problems assembly & c++, playing around , learning how use assembly in c++ couldn't seem able function in asm return value wanted to. c++ code:

#include <iostream>  using namespace std;  extern "c" int getvaluefromasm();  int main() {     cout << getvaluefromasm();     cin.ignore();     return 0; } 

and asm code in file:

.code getvaluefromasm proc     move eax, 489     ret getvaluefromasm endp  end 

the errors recieve are

error2 error lnk1120: 1 unresolved externals     error1 error lnk2019: unresolved external symbol getvaluefromasm referenced in function main 

i using visual studio 2013 & , masm assembly & selected x64 in configuration manager, info there.

i thankful new asm.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -