Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > I am getting following error when I am building my C program

Reply
Thread Tools

I am getting following error when I am building my C program

 
 
friend.05
Guest
Posts: n/a
 
      09-30-2006
I am able to compile the program, but while building it I am getting
following error,can any explain when does this error mean.


Command Lines
Creating temporary file "C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp" with
contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /incremental:yes
/pdb:"Debug/ENEE_WIN.pdb" /debug /machine:I386
/out:"Debug/ENEE_WIN.exe" /pdbtype:sept
..\Debug\graph.obj
..\Debug\main.obj
]
Creating command line "link.exe
@C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp"
Output Window
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
_WinMain@16
Debug/ENEE_WIN.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

 
Reply With Quote
 
 
 
 
clayne
Guest
Posts: n/a
 
      09-30-2006
friend.05 wrote:
> I am able to compile the program, but while building it I am getting
> following error,can any explain when does this error mean.
>
> Command Lines
> Creating temporary file "C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp" with
> contents


I've seen this error somewhere before. Best bet is to reformat the hard
drive and install a unix variant on it - usually fixes it.

 
Reply With Quote
 
 
 
 
Tim Prince
Guest
Posts: n/a
 
      09-30-2006
friend.05 wrote:

> Linking...
> LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
> _WinMain@16
> Debug/ENEE_WIN.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
>


It says you haven't passed a main() .obj to the linker. Either there is
no main() in your source or libraries, or the compile failed. As to
the snide remarks, it is equally possible to see such a problem on other
suggested OS.
 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      09-30-2006
"friend.05" writes:

>I am able to compile the program, but while building it I am getting
> following error,can any explain when does this error mean.
>
>
> Command Lines
> Creating temporary file "C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp" with
> contents
> [
> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
> advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
> odbccp32.lib /nologo /subsystem:windows /incremental:yes
> /pdb:"Debug/ENEE_WIN.pdb" /debug /machine:I386
> /out:"Debug/ENEE_WIN.exe" /pdbtype:sept
> .\Debug\graph.obj
> .\Debug\main.obj
> ]
> Creating command line "link.exe
> @C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp"
> Output Window
> Linking...
> LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
> _WinMain@16
> Debug/ENEE_WIN.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.


That looks kind of familiar. Browse the existing messages on a newsgroup or
forum or whatever related to your compiler. If you come up empty, post your
question there.


 
Reply With Quote
 
clayne
Guest
Posts: n/a
 
      09-30-2006
Tim Prince wrote:
> > Linking...
> > LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
> > _WinMain@16

>
> It says you haven't passed a main() .obj to the linker. Either there is
> no main() in your source or libraries, or the compile failed. As to
> the snide remarks, it is equally possible to see such a problem on other
> suggested OS.


Pretty sure I won't be seeing unresolved errors for _WinMain on any
serious OS I use anytime soon.

Effort in, effort out.

 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      09-30-2006
friend.05 wrote:
> I am able to compile the program, but while building it I am getting
> following error,can any explain when does this error mean.
>
>
> Command Lines
> Creating temporary file "C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp" with
> contents
> [
> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
> advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
> odbccp32.lib /nologo /subsystem:windows /incremental:yes
> /pdb:"Debug/ENEE_WIN.pdb" /debug /machine:I386
> /out:"Debug/ENEE_WIN.exe" /pdbtype:sept
> .\Debug\graph.obj
> .\Debug\main.obj
> ]
> Creating command line "link.exe
> @C:\DOCUME~1\isis\LOCALS~1\Temp\RSP6E.tmp"
> Output Window
> Linking...
> LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
> _WinMain@16
> Debug/ENEE_WIN.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
>


Windows programs need an entry point called
WinMain

Programs to be run in the console use the standard main()
procedure. Just link your program as a console application
and you will solve this problem.

 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      09-30-2006
Tim Prince said:

> friend.05 wrote:
>
>> Linking...
>> LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
>> _WinMain@16
>> Debug/ENEE_WIN.exe : fatal error LNK1120: 1 unresolved externals
>> Error executing link.exe.
>>

>
> It says you haven't passed a main() .obj to the linker.


No, it doesn't.

> Either there is
> no main() in your source or libraries, or the compile failed. As to
> the snide remarks, it is equally possible to see such a problem on other
> suggested OS.


Not this one.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/822319ev1'. 'HTTP/1.1 500 Internal Server Error'. chanmm ASP .Net 2 09-07-2010 07:37 AM
Error in Following python program Pramod Python 2 09-04-2010 06:49 PM
I am getting the following error parag_paul@hotmail.com C++ 2 06-11-2008 06:58 AM
RE: The Web server reported the following error when attempting to create or open the Web project located at the following URL: <URL> =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?= ASP .Net 0 06-07-2004 07:36 AM
Building to Building wireless Patriot Cisco 2 11-04-2003 05:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57