Sign in to follow this  
INA_ctive

Code::Blocks + MSVC++ 2003 Toolkit error when compiling SDL application

Recommended Posts

i use Code::Blocks as my IDE and MSVC++ 2003 Toolkit as the compiler. I tried to compile very basic does-nothing program and i got error. I have included SDL.lib and SDLmain.lib in the project settings>linker and i have enabled multithreaded DLL and executable for both debug and release settings. here's messages that appears right before the error message which i couldn't understand (probably due to enabling multithreaded option)
Quote:
cl : Command line warning D4025 : overriding '/MDd' with '/MD' cl : Command line warning D4025 : overriding '/MD' with '/MTd' cl : Command line warning D4025 : overriding '/MTd' with '/MT' cl : Command line warning D4025 : overriding '/MT' with '/MDd' cl : Command line warning D4025 : overriding '/MDd' with '/MD' cl : Command line warning D4025 : overriding '/MD' with '/MTd' cl : Command line warning D4025 : overriding '/MTd' with '/MT' cl : Command line warning D4025 : overriding '/MT' with '/MDd' cl : Command line warning D4025 : overriding '/MDd' with '/MD' cl : Command line warning D4025 : overriding '/MD' with '/MTd' cl : Command line warning D4025 : overriding '/MTd' with '/MT'
here's my error messages:
Quote:
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _exit imported in function _main SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _strncpy imported in function _main SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol __pctype imported in function _ParseCommandLine SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol ___mb_cur_max imported in function _ParseCommandLine SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol __isctype imported in function _ParseCommandLine SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__strrchr referenced in function _main SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _ShowError SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp___iob referenced in function _ShowError SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__remove referenced in function _cleanup_output SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fopen referenced in function _cleanup_output SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fgetc referenced in function _cleanup_output SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fclose referenced in function _cleanup_output SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__setbuf referenced in function _WinMain@16 SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__setvbuf referenced in function _WinMain@16 SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__freopen referenced in function _WinMain@16 SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp___getcwd referenced in function _WinMain@16 SDLapp.exe : fatal error LNK1120: 11 unresolved externals
here's my hello world code:
Quote:
#include <SDL/SDL.h> int main ( int argc, char *argv[] ) { return 0; }
i search the forum and googled a bit, and any problem that's similiar to mine can be resolved by setting the multithreading options but in mine, i think that's nt the case :| can anyone help? thank you. ps: what is the bbcode for posting code?

Share this post


Link to post
Share on other sites
because in the manual came from SDL said that we should enable multi-threaded options:
Quote:


Set the C runtime to "Multi-threaded DLL" in the menu: Project|Settings|C/C++ tab|Code Generation|Runtime Library .


but i tried to disable it, and it seems that whether it's enabled or disabled it does not make any difference.
and now oddly enough, the error has reduced to this:
Quote:

LINK : fatal error LNK1561: entry point must be defined

just after i closed and reopened my SDL application, but i still dont know how to fix it. anyone can help??

Share this post


Link to post
Share on other sites

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