Sorry about the vagueness of the thread title, I didn't want to scare anyone away...
Ok, I started learning about Linking assembly routines into visual C++ programs via the Custom Build options.
I think I've declared everything as I should, here's my main C++ source:
Now the .asm file, with the declaration of _asm_main:
extern "C" _asm_main();
int main (int argc, char* argv)
I'm assembling with TASM 5.0, using the Custom Build command 'C:\TASM\BIN\TASM.EXE $(InputPath)' and output 'extproc.obj' (the assembly file is called extproc.asm).
.model flat, C
mov eax, 10
I get the infamous LNK1120 (unresolved externals). Here's the complete output, for the record:
Help greatly appreciated
--------------------Configuration: atest - Win32 Debug--------------------
Performing Custom Build Step on .\extproc.asm
Turbo Assembler Version 4.1 Copyright (c) 1988, 1996 Borland International
Assembling file: .\extproc.asm to extproc.OBJ
Error messages: None
Warning messages: None
Remaining memory: 411k
.\extproc.obj : warning LNK4033: converting object format from OMF to COFF
main.obj : error LNK2001: unresolved external symbol __asm_main
Debug/atest.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
atest.exe - 3 error(s), 2 warning(s)