Article View: alt.comp.lang.learn.c-c++
Article #754Re: Fatal errors: unresolved externals ?
From: Chris Marriott
Date: Sun, 08 Jun 1997 00:00
Date: Sun, 08 Jun 1997 00:00
30 lines
1895 bytes
1895 bytes
In article <339A880B.27@online.no>, Lee Francis Wilhelmsen
<leefw@online.no> writes
>I use the MS Visual C++ 4.0 software package, and although I have no
>problems compiling, I'm having difficulties linking! I keep on getting
>one error as follows:
>
>Linking...
>LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
>Sysmets1.exe : fatal error LNK1120: 1 unresolved externals
>Error executing link.exe.
>Sysmets1.exe - 2 error(s), 0 warning(s)
>
>Any comments or suggestions?
By default the linker tries to create a console application, whose entry
point is a function called "main". You are presumably trying to create
Windows app, which doesn't have a "main" function, hence the message. To
tell the linker to create a Windows app, add:
/subsystem:windows
to the list of linker options.
Chris
----------------------------------------------------------------
Chris Marriott, Microsoft Certified Solution Developer.
SkyMap Software, U.K. e-mail: chris@skymap.com
Visit our web site at http://www.skymap.com
Technical Details
Message-ID:
<4qqHGDAxHpmzEwwz@chrism.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<339A880B.27@online.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114592,fb4f8462562f8c73 X-Google-Attributes: gid114592,public X-Google-Thread: 105df1,fb4f8462562f8c73 X-Google-Attributes: gid105df1,public X-Google-Thread: 10caf2,fb4f8462562f8c73 X-Google-Attributes: gid10caf2,public X-Google-Thread: f7033,fb4f8462562f8c73 X-Google-Attributes: gidf7033,public From: Chris Marriott <chris@chrism.demon.co.uk> Subject: Re: Fatal errors: unresolved externals ? Date: 1997/06/08 Message-ID: <4qqHGDAxHpmzEwwz@chrism.demon.co.uk> X-Deja-AN: 247030978 Distribution: world X-NNTP-Posting-Host: chrism.demon.co.uk [158.152.9.231] References: <339A880B.27@online.no> Organization: SkyMap Software Newsgroups: alt.comp.lang.learn.c-c++,fj.lang.c++,comp.os.ms-windows.programmer.controls,comp.os.ms-windows.programmer.misc