views:

632

answers:

1

Hi everybody, I managed to set NASM as compiler for separate .asm files, but I can't find a way to set NASM as compiler for inline assembler (__asm directive). For example,

helloWorld    db    "Hello world !",0

won't compile (assembler syntax error, found "db"). Is there a way to do that ? Or am I bound to use MASM or use another development environment ? Thanks !

ps : by the way the MSDN doesn't give any clue :D

+2  A: 

I guess that the inline assembler is built-in (isn't MASM), and can't be plug-replaced.

You can use an external assembler (e.g. MASM) by itself (not as an 'inline' assembler) to create object (*.obj) files, and then link these object files to your C++ code using the linker.

ChrisW
With NASM it's likely that the object files will have .o extension.
Bastien Léonard