[M3devel] new problem linking on NT386

Randy Coleburn rcoleburn at scires.com
Tue May 6 04:08:29 CEST 2008


Jay:
 
No, I am using the -gui option in the m3makefile.  It is a windows gui application.
 
Here is the output of the command you suggested:
 
Microsoft (R) COFF/PE Dumper Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.
 

Dump of file NT386\_m3main.obj
 
File Type: COFF OBJECT
 
COFF SYMBOL TABLE
000 00000000 DEBUG  notype       Filename     | .file
    _m3main.mc
002 00000000 SECT1  notype       Static       | .text
    Section length   50, #relocs    4, #linenums    7, checksum        0
004 00000000 SECT2  notype       Static       | .data
    Section length   10, #relocs    3, #linenums    0, checksum        0
006 00000000 SECT3  notype       Static       | .bss
    Section length    0, #relocs    0, #linenums    0, checksum        0
008 00000000 SECT1  notype ()    External     | _main
    tag index 0000000A size 00000050 lines 00000104 next function 00000000
00A 00000000 SECT1  notype       BeginFunction | .bf
    line# 0000 end 00000000
00C 00000007 SECT1  notype       .bf or.ef    | .lf
00D 00000050 SECT1  notype       EndFunction  | .ef
    line# 0006
00F 00000000 SECT1  notype       Static       | TextSegment
010 00000000 UNDEF  notype       External     | _Main_M3
011 00000000 UNDEF  notype       External     | _RTLinker__InitRuntime
012 00000000 UNDEF  notype       External     | _RTLinker__AddUnit
013 00000000 UNDEF  notype       External     | _RTProcess__Exit
014 00000004 SECT2  notype       Static       | T$14
 
String Table Size = 0x4B bytes
 
  Summary
 
           0 .bss
          10 .data
          50 .text
As you can see, I have an
   _main  and a
   _Main_M3
 
Not sure what you mean by saying I am missing hand.obj.  I have rebuilt everything using latest CVS update.  Please elaborate.
 
Regards,
Randy

>>> Jay <jayk123 at hotmail.com> 5/5/2008 9:47 PM >>>
Sounds like you missed the "gui" switch on the cm3 command line
or in the m3makefile -- in the m3makefile really.
Putting it on the command line imho is only reasonable for those
simple cases that don't have an m3makefile

 link -dump -symbols NT386\_m3main.obj | findstr /i main 

?
I expect you will have main or wmain, but not WinMain or wWinMain.
 
Is this meant to be a gui app or a command line app?
If it is meant to be a command line, then the problem is something else.
  And I don't even want to explain..
Can you send me the source?
 
Also you are missing hand.obj here, so you don't have the potential pixmap fix.

 - Jay

Date: Mon, 5 May 2008 21:01:10 -0400
From: rcoleburn at scires.com 
To: m3devel at elegosoft.com 
Subject: [M3devel] new problem linking on NT386

I've rebuild my cm3 system using the latest sources.
 
I am now having a failure linking certain programs that used to build without problems.
 
I've listed the linker output from one of the programs below.  The issue seems to be an unresolved external symbol _WinMain at 16 .
 
Any ideas on what has changed and how to get this working again?
 
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.
 
/out:CV_MessageTool.exe 
/subsystem:windows 
/entry:WinMainCRTStartup 
/nodefaultlib 
/debug 
/incremental:no 
/opt:ref 
/delayload:wsock32.dll 
/delayload:advapi32.dll 
/delayload:gdi32.dll 
/delayload:netapi32.dll 
/delayload:user32.dll 
/delayload:comctl32.dll 
delayimp.lib 
_m3main.obj 
iconRes.obj 
Resources.io 
Resources.mo 
Main.mo 
C:\cm3\pkg\windowsResources\NT386\windowsResources.lib 
C:\cm3\pkg\libSciRes3\NT386\libSciRes3.lib 
C:\cm3\pkg\stable\NT386\stable.lib 
C:\cm3\pkg\serial2\NT386\serial2.lib 
C:\cm3\pkg\netobj\NT386\m3netobj.lib 
C:\cm3\pkg\parseparams\NT386\m3parseparams.lib 
C:\cm3\pkg\formsvbt\NT386\m3formsvbt.lib 
C:\cm3\pkg\videovbt\NT386\videovbt.lib 
C:\cm3\pkg\jvideo\NT386\jvideo.lib 
C:\cm3\pkg\web\NT386\web.lib 
C:\cm3\pkg\tcp\NT386\m3tcp.lib 
C:\cm3\pkg\formsvbtpixmaps\NT386\m3formsvbtpixmaps.lib 
C:\cm3\pkg\vbtkit\NT386\m3vbtkit.lib 
C:\cm3\pkg\ui\NT386\m3ui.lib 
C:\cm3\pkg\libm3\NT386\m3.lib 
C:\cm3\pkg\m3core\NT386\m3core.lib 
winspool.lib 
comctl32.lib 
wsock32.lib 
comdlg32.lib 
netapi32.lib 
gdi32.lib 
user32.lib 
advapi32.lib 
kernel32.lib 
msvcrt.lib 
LINK : warning LNK4199: /DELAYLOAD:wsock32.dll ignored; no imports found from wsock32.dll
LINK : warning LNK4199: /DELAYLOAD:advapi32.dll ignored; no imports found from advapi32.dll
LINK : warning LNK4199: /DELAYLOAD:gdi32.dll ignored; no imports found from gdi32.dll
LINK : warning LNK4199: /DELAYLOAD:netapi32.dll ignored; no imports found from netapi32.dll
LINK : warning LNK4199: /DELAYLOAD:user32.dll ignored; no imports found from user32.dll
LINK : warning LNK4199: /DELAYLOAD:comctl32.dll ignored; no imports found from comctl32.dll
msvcrt.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain at 16 referenced in function ___tmainCRTStartup
CV_MessageTool.exe : fatal error LNK1120: 1 unresolved externals
Regards,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080505/db2c0dc9/attachment-0002.html>


More information about the M3devel mailing list