Jump to content
  • Advertisement
Sign in to follow this  
Cheezmeister

"entry point must be defined" in MSVC8

This topic is 4565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here's my code: #include "SDL/SDL.h" #include "utils.h" int main(int argc, char* args[]) { return 0; } Why would I get this error? Says the error is caused if I'm trying to make a .dll, or if i'm missing a main function, neither of which is true. If the code in either of the headers is relevant, I'll post that, too. Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement
Hmm, I am using /NODEFAULTLIB, to get rid of some other errors and frankly I don't know what it does. Could that be the problem, and if so, how do I handle these

1>msvcrt.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
1>msvcrt.lib(MSVCR80.dll) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj)
1>LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
1>LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
?

Share this post


Link to post
Share on other sites
Quote:
Original post by Cheezmeister
Hmm, I am using /NODEFAULTLIB, to get rid of some other errors and frankly I don't know what it does. Could that be the problem, and if so, how do I handle these

1>msvcrt.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
1>msvcrt.lib(MSVCR80.dll) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj)
1>LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
1>LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
?

Make sure that all projects and libraries are compiled to use the "Multithreaded DLL" version of the C runtime library. That means in every project go to Properties > Configuration Properties > C/C++ > Code Generation and make sure that the "Runtime Library" is set to Multi-threaded DLL (/MD) or Multi-threaded Debug DLL (/MDd). That might fix your problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!