By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,131 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,131 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Sep 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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.

Sep 30 '06 #2

P: n/a
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.
Sep 30 '06 #3

P: n/a
"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.
Sep 30 '06 #4

P: n/a
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. :P

Effort in, effort out.

Sep 30 '06 #5

P: n/a
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.

Sep 30 '06 #6

P: n/a
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)
Sep 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.