| | |
linker problem 2
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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??
Views: 1095 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll dynamic encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort stream string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






