| | |
linker problem 2
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hello,
I edited a source code I found on a net and now it compiles well. I get a linker error.
I have included:
and this is in my liker options:
What else do I have to add to linker options?
I edited a source code I found on a net and now it compiles well. I get a linker error.
C++ Syntax (Toggle Plain Text)
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:
C++ Syntax (Toggle Plain Text)
#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:
C++ Syntax (Toggle Plain Text)
ws2_32.lib wsock32.lib winmm.lib
What else do I have to add to linker options?
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Linker problem (C++)
- Linker Problem (C++)
Other Threads in the C++ Forum
- Previous Thread: LValue Required
- Next Thread: install library how to??
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






