News:

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

Link error

Started by Ian_B, May 03, 2006, 04:22:21 PM

Previous topic - Next topic

Ian_B

Can anyone explain what might be causing this link error:

warning LNK4033: converting object format from OMF to COFF

The project used to compile/assemble and link fine, then I added some Treeview code and it locks up with this. The resource compile and assemble steps seem to be OK, so I can't see why it should be the code I added, it's just this stage, after which I get a sequence of similar API call errors:

MyApp.obj : error LNK2001: unresolved external symbol _MessageBoxA@16

Using MASM 6.15, Link 5.12.8078, WinASM 5.1.3.0 (which could be the culpit, I have found other problems with that appearing, but I can't see why that would affect the external compile/link process).

Ian_B

P1

It seems to me that most of these are path issues.

Build it manual, to see where.

Regards,  P1  :8)

Ian_B

Yes, I'd just realised that paths were the obvious possibility. But the paths appear fine in the WinASM setup, I've reset them carefully, and the ones in the code weren't altered between the working link and the non-working one. Is there a way to get a more verbose listing of the linker output that will show up exactly where it's breaking down?

What makes this odder is that it's something specific to this project, other WinASM projects I have assemble and link fine still, so it's not any global settings in the IDE. And the include/includelib lines are fine in this code.  :eek

P1

I see verbose and warn as possiable options to play with.  Be sure to pipe the results to a text file.

Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

usage: LINK [options] [files] [@commandfile]

   options:

      /ALIGN:#
      /BASE:{address|@filename,key}
      /COMMENT:comment
      /DEBUG
      /DEBUGTYPE:{CV|COFF}
      /DEF:filename
      /DEFAULTLIB:library
      /DLL
      /DRIVER[:{UPONLY|WDM}]
      /ENTRY:symbol
      /EXETYPE:DYNAMIC
      /EXPORT:symbol
      /FIXED[:NO]
      /FORCE[:{MULTIPLE|UNRESOLVED}]
      /GPSIZE:#
      /HEAP:reserve[,commit]
      /IMPLIB:filename
      /INCLUDE:symbol
      /INCREMENTAL:{YES|NO}
      /LARGEADDRESSAWARE[:NO]
      /LIBPATH:dir
      /MACHINE:{ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH4}
      /MAP[:filename]
      /MAPINFO:{EXPORTS|FIXUPS|LINES}
      /MERGE:from=to
      /NODEFAULTLIB[:library]
      /NOENTRY
      /NOLOGO
      /OPT:{ICF[,iterations]|NOICF|NOREF|NOWIN98|REF|WIN98}
      /ORDER:@filename
      /OUT:filename
      /PDB:{filename|NONE}
      /PDBTYPE:{CON[SOLIDATE]|SEPT[YPES]}
      /PROFILE
      /RELEASE
      /SECTION:name,[E][R][W][D][K][L][P][X]
      /STACK:reserve[,commit]
      /STUB:filename
      /SUBSYSTEM:{NATIVE|WINDOWS|CONSOLE|WINDOWSCE|POSIX}[,#[.##]]
      /SWAPRUN:{CD|NET}
      /VERBOSE[:LIB]
      /VERSION:#[.#]
      /VXD
      /WARN[:warninglevel]
      /WINDOWSCE:{CONVERT|EMULATION}
      /WS:AGGRESSIVE


Regards,  P1  :8)

Ian_B

Verbose didn't reveal much more than I was getting before.  :P

Start Pass1
iPAR.obj : warning LNK4033: converting object format from OMF to COFF

Searching Libraries

Done Searching Libraries

End Pass1


After which I get every API reference thrown back. What would prevent it failing to make the COFF conversion, and what is that anyway? I am beginning to think it is an error in the assembled object file rather than in the linking... but swapping back to MASM6.14 doesn't make any difference.

Ossa

COFF is the format of the OBJ (and LIB files?), OMF being the old format... so either you've managed to try to include a very old .lib, or the assembly commandline is causing it to assemble your .asm file into an old format .obj (this is more likely, I'm guessing). If in WinASM, you can see what commandline its using, check it and if you can, add the /coff switch.

If the problem persists, try to find out what the assemble/link commandlines are and post them here,
Ossa

[edit] Just saw that you'd added some more code... how is that added in? someone else's lib or obj file? this could be the problem, otherwise, check those assemble commands very carefully [/edit]
Website (very old): ossa.the-wot.co.uk

Ian_B

AGGH! Thanks, Ossa, now it works fine. Yes, the /coff and /Cp options were removed from the assemble command line. I have no idea how I did that.  :(  WinASM has been doing some very strange things for me recently...

PBrennick

Ian_B,
You are not the first person  to be bitten by an IDE.  P1 knew what he was saying when he suggested yu do it manually to se  :Ue where.

I am glad you found the error in a relatively short period of time.
Paul
The GeneSys Project is available from:
The Repository or My crappy website