0

Hello,

I edited a source code I found on a net and now it compiles well. I get a linker error.

1>Linking...
1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
1>C:\Users\jan\Documents\Visual Studio 2005\Projects\YAST server console\Release\YAST server console.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\jan\Documents\Visual Studio 2005\Projects\YAST server console\YAST server console\Release\BuildLog.htm"
1>YAST server console - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have included:

#include <stdlib.h>
#include <windows.h>
#include <winsock.h>  
#include <stdio.h>
#include <commctrl.h>
#include <Winuser.h>
#include <iostream>
#include <time.h>
#include <mmsystem.h>

and this is in my liker options:

ws2_32.lib wsock32.lib winmm.lib

What else do I have to add to linker options?

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by jan1024188
0

The error indicates the program does not have a main() function -- maybe you did not create the correct type of project, such as you created a console project when you should have created a windows project.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.