News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

I can't link from assembled files !!!

Started by SonnyC, June 24, 2007, 07:54:17 PM

Previous topic - Next topic

SonnyC

Hello everybody !


I start playing with asm, ans I got a little problem :

I got few c files. I compile them with (for example):
    cl /c *.c
    cl *.obj
it works, well.

Now what I want, is compile this file, modify some asm instructions, and assemble and link.

I try :
    cl /FA /c *.c
    ml file1.asm file2.asm ...

and here I got "symbol already defined in a previous module" errors.

Why .obj from .asm are not the same of those compile directly with cl ?
Thanks for your help. I think I'll take lot of time reading this forum ;)

Note: This works with gcc:
    gcc -S *.c
    as *.s
    gcc *.obj



drizz

Hello
Quote from: SonnyC on June 24, 2007, 07:54:17 PMand here I got "symbol already defined in a previous module" errors.
i think you'll have to put in some more switches.. like /coff for ml, /TC for cl,
it's hard to say without source.
Quote from: SonnyC on June 24, 2007, 07:54:17 PMWhy .obj from .asm are not the same of those compile directly with cl ?
i can think of a couple of reasons,
1) each puts its own trademark and id (@comp.id)
2) cl puts more debug information
3) maybe compiling to asm prevents cl from some global optimization...
The truth cannot be learned ... it can only be recognized.