Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Phil165

I need help with SDL

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

Im setting up my first SDL project in VC7, I followed all the instructions on thier page conserning setting up the API in .NET. found here: http://www.libsdl.org/cgi/cvsweb.cgi/~checkout~/SDL12/VisualC.html?only_with_tag=release_1_2_5 by the way just so you know when I included SDL.lib and SDLmain.lib I had to enter the whole directory instead of just the file name, I was getting an error that said SDL.lib not found before entering this. Anyway when I try to compile: #include "SDL.h" int main( int argc, char* argv[] ) { // Body of the program goes here. return 0; } I now get the error: SDL test fatal error LNK1104: cannot open file ''C:\Program.obj'' whats going on?

Share this post


Link to post
Share on other sites
Advertisement
Looks like you set up your project wrong. Check the project directory is really c:\

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Set up the environment variables properly. It''ll be something to do with the build settings, seems to be truncating Program Files/folder/to/object/files.obj to program.obj

Share this post


Link to post
Share on other sites
Am I supposed to start it as an empty console application or windows application?

I got the error above starting out the project as an empty windows application, as a console application I get these errors:

SDL Test error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
SDL Test error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
SDL Test error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
SDL Test warning LNK4098: defaultlib ''msvcrt.lib'' conflicts with use of other libs; use /NODEFAULTLIB:library
SDL Test fatal error LNK1169: one or more multiply defined symbols found

Share this post


Link to post
Share on other sites
Does anyone here use 2D?, if so what API? Aperently, no one uses SDL!

Sorry, Im just frustraded...learning a new language and API is a mindfull sometimes. Times like these I tell myself to go back to java or Actionscript, but the part of me with a passion for games tells me not to give up.

I just realized that this forum is for non-API related programming, so are there any active SDL communities out there?

[edited by - Phil165 on April 2, 2003 4:29:23 PM]

Share this post


Link to post
Share on other sites
I use SDL for my programming. I have experience using VS7C++ and it was hell. I dont know, I ran a wizard, made my basic windows app and couldnt even run the damn project. If I did that for vb it would run fine. So I went back to MSVS 6 and I have no problems.

"by the way just so you know when I included SDL.lib and SDLmain.lib I had to enter the whole directory instead of just the file name, I was getting an error that said SDL.lib not found before entering this."

What you should do is set your path lib and header folders in the IDE then you can type in the filenames. Like in VS6 or borland.

This path might be c:\ for some reason.. It should be like

c:\program files\MSVS7\libs\

c:\program files\MSVS7\headers\

then put all the sdl headers in the child dir such as
c:\program files\MSVS7\headers\sdl\

these are just examples
then you would do this

#include <sdl/SDL.h>

to include the libs, you should be able to add to the project and select the lib files you want.

But like I said VS7 was hell, and I dont like it for my C++ needs.

Share this post


Link to post
Share on other sites

  • 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!