Problem with old/new SDL libraries!

Well, to describe the problem:

I can’t compile SDL program when using new libraries, just old ones.

When I use this:

New SDL.lib creation date: - 13. april 2002, 16:00:00
& new SDLmain.lib creation date: - 13. april 2002, 16:01:00

Visual studio on next code reports next errors:--------------
Code:

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include “SDL_image.h”

int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Quit();
exit(1);
}

Errors:

Deleting intermediate files and output files for project ‘fonttest’,
configuration ‘Debug|Win32’. Compiling… SoFont.cpp program.cpp
Generating Code… Linking…
msvcrt.lib(MSVCR70.dll) : error LNK2005: _exit already defined in
LIBCMT.lib(crt0dat.obj)
msvcrt.lib(MSVCR70.dll) : error LNK2005: _strncpy already defined in
LIBCMT.lib(strncpy.obj)
msvcrt.lib(MSVCR70.dll) : error LNK2005: _fprintf already defined in
LIBCMT.lib(fprintf.obj)
msvcrt.lib(MSVCR70.dll) : error LNK2005: _fclose already defined in
LIBCMT.lib(fclose.obj)
msvcrt.lib(MSVCR70.dll) : error LNK2005: __isctype already defined in
LIBCMT.lib(isctype.obj)
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib’
conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/fonttest.exe : fatal error LNK1169: one or more multiply defined
symbols found


But, WHEN I USE :

“OLD” SDL.lib creation date: - 03. 03. 2000, 18:16:00
& “OLD” SDLmain.lib creation date: - 03. 03. 2000, 18:16:00

It-s all OK???

SO, IF ANYONE KNOW THE REASON OF THOSE ERRORS, PLEASE REPORT:)

Thanks in advance

Tonci Jukic

Well, to describe the problem:

I can’t compile SDL program when using new libraries, just old ones.

When I use this:

New SDL.lib creation date: - 13. april 2002, 16:00:00
& new SDLmain.lib creation date: - 13. april 2002, 16:01:00


Errors:

Deleting intermediate files and output files for project ‘fonttest’,
configuration ‘Debug|Win32’. Compiling… SoFont.cpp program.cpp
Generating Code… Linking…
msvcrt.lib(MSVCR70.dll) : error LNK2005: _exit already defined in
LIBCMT.lib(crt0dat.obj)

This is in the FAQ:
http://www.libsdl.org/faq.php?action=listentries&category=4#43

Q: When using Visual C++ I get link errors relating to MSVCRT.LIB or LIBC

See ya,
-Sam Lantinga, Software Engineer, Blizzard EntertainmentA: SDL is dynamically linked with the multi-threaded version of the Microsoft Visual C runtime. You need to edit your project settings, go to the C++ language tab, change the listbox to “Code Generation” settings, and then change the runtime library to “Multi-threaded DLL”. Make sure you do this with all projects that you link into your application.