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

F

friend.05

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.
 
C

clayne

friend.05 said:
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.
 
T

Tim Prince

friend.05 said:
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.
 
O

osmium

friend.05 said:
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.
 
C

clayne

Tim said:
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.
 
J

jacob navia

friend.05 said:
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.
 
R

Richard Heathfield

Tim Prince said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top