WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
What is FASM G
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Using asm inside visual studio 2013 (x64 project), I am trying to use asm inside a visual studio x64 project seeing as inline asm is not added to work for x64, can anyone help?

Anddos
Quote Post


New Member
*

Group: Members
Posts: 1
Member No.: 49706
Joined: 20-February 12


I am trying to use asm inside a visual studio x64 project seeing as inline asm is not added to work for x64, can anyone help ?

CODE
//asm.cpp
#include "stdafx.h"
#include <iostream>

extern "C" int GetValueFromASM();

int _tmain(int argc, _TCHAR* argv[])
{
       std::cout << GetValueFromASM() << std::endl;

       return 0;
}

//header.asm
.code
GetValueFromASM proc
mov eax,2783
ret
GetValueFromASM endp
end


> asm.cpp
1>asm.obj : error LNK2001: unresolved external symbol GetValueFromASM
1>F:\Projects\asm\x64\Release\asm.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Sponsored Links
PMEmail Poster
Top
dila
Quote Post


New Member
*

Group: Members
Posts: 16
Member No.: 823
Joined: 3-December 04


Have you tried changing the line to:
CODE
std::cout << _GetValueFromASM() << std::endl;

I think the compiler inserts an underscore in the function name.

Also, are you able to look inside the .OBJ file that is generated from your assembler unit and see the symbol names (assuming they are generated at all).
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google