Sign in to follow this  

"entry point must be defined" in MSVC8

This topic is 4198 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
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

This topic is 4198 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this