Sign in to follow this  

Help

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

Alright, I'm new the gaming. I have a good amount of C++ experience but have no graphics experience. I want to try to create a simple game, maybe black jack or tic-tac-toe, but I want to incorporate some graphics, possibly with DirectX. I need some help as to where to get started. I've tried looking at about 5 directx tutorials now and am getting nowhere and I'm getting very frustrated. :( Any advice. I may go out an buy some books later. Any titles I should look for?

Share this post


Link to post
Share on other sites
SDL will be perfectly fine for that (unless you want it to run inside a GUI element in a window, in which case things get a little more tricky and would require you to play around with the SDL source a bit).

Share this post


Link to post
Share on other sites
*sigh*
Okay, I'm trying to install SDL with visual C++. I'm trying this tutorial: http://pgdc.purdue.org/sdltutorial/sdl_setup.html.

I got to the end. It compiled fine but when it tried to build, I got this error. I've been getting all build errors with VC++ with other tutorials also.


--------------------Configuration: sdl test - Win32 Debug--------------------
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/sdl test.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

sdl test.exe - 6 error(s), 1 warning(s)

Share this post


Link to post
Share on other sites
Oh, I should also say that this tutorial uses Visual Studio .NET, but I only have VC++. I didn't think it would matter much. I managed to get through everything except in the middle when I was supposed to:

"Right-click on the name of your project in the Solution explorer and select "Properties".

Select the "code Generation" on the left. On the right, select the "Runtime Library" pull down menu and choose Multi-Threaded DLL or Multi-Threaded Debug DLL if you wish to use debugging. Hit OK."

I had no 'code Generation' tab under the properties

Share this post


Link to post
Share on other sites
From the SDL FAQ:
Quote:

Q: How do I use SDL with Visual C++?
A: Read the file "VisualC.html" included with both the SDL Visual C++ development archive, and the SDL source archive.


Share this post


Link to post
Share on other sites
More errors. I give up.

--------------------Configuration: sdl - Win32 Debug--------------------
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/sdl.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

Share this post


Link to post
Share on other sites
In VC++ 6.0 I believe the code generation options are under C++ in the project settings dialog. Setting the runtime library here to multithreaded dll should get things working.

The other way to fix this is to get it to ignore msvcrt.lib. You need to put 'msvcrt.lib' in the ignore libraries box under the linker options in the project settings dialog (names may be slightly different just hunt around in the linker options and you'll find it).

Share this post


Link to post
Share on other sites
Danne, I tried the visualc.html help file, i couldn't do what monder is telling me how to do, so I should be good now. I'll try it out later tongiht, i'm a little busy right now

thanks everyone

Share this post


Link to post
Share on other sites

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