Distributing SDL Projects With Visual Studio

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Master Jake
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 69
Joined: Sat Dec 12, 2009 8:43 pm
Programming Language of Choice: C/C++
Location: United States
Contact:

Distributing SDL Projects With Visual Studio

Post by Master Jake »

I haven't distributed anything in a very long time, but here is one of the problems I remember experiencing every time.

Keep in mind this only happens on Visual Studio. All my Dev-C++ projects worked fine, but I want to use Visual Studio because of the intellisense, and overall environment.

The problem is, when I compile everything, zip it up, and send it to someone then if they don't have Visual Studio on their computer it won't run. I can't remember the exact error it gives (I can find out again if needed).

Anyway, on some of my old Win32 projects I had the same problem and someone told me to go to Propect Properties and make it use Multi-byte character set instead of unicode. I did so and that worked.

I guess my question is this: What are all of the project settings I need to distribute C++ projects (specifically SDL).

I am using Microsoft Visual C++ 2005 Professional Edition. Also, should I compile it as Debug or Release?
User avatar
Milch
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Sat Jul 11, 2009 5:55 am
Programming Language of Choice: C++
Location: Austria, Vienna

Re: Distributing SDL Projects With Visual Studio

Post by Milch »

Do you sent the .exe with the SDL.dll?
And keep in mind that Visual Studio uses a framework.
Follow me on twitter!
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Distributing SDL Projects With Visual Studio

Post by Falco Girgis »

There is a folder somewhere within your Visual Studio install called "Redist." I even think it has a readme. These are going to be the dependencies that your VS projects require to run. Make sure that you have built your project in Release and not Debug. You aren't supposed to be able to share a debug build with somebody that doesn't have Visual Studio.

Other than that, if you dynamically linked to SDL, you will have to provide SDL.dll. If it was a static link, don't worry about it.

If that still doesn't work, go to project settings and make sure that your manifest is embedded (don't really know how that works in VS2005).
Master Jake
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 69
Joined: Sat Dec 12, 2009 8:43 pm
Programming Language of Choice: C/C++
Location: United States
Contact:

Re: Distributing SDL Projects With Visual Studio

Post by Master Jake »

Thanks, I will definitely try these suggestions as soon as possible. I think one of my main problems would be me compiling in Debug. I also always include all of the SDL DLL's with the executable.

I'll reply back here with solved if everything works now.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Distributing SDL Projects With Visual Studio

Post by eatcomics »

Yeah I would love an explanation to this, as I too have had trouble distributing my VC++ stuff... Trust me, staying up all night getting a project to work for your english class, then the program not running on your teachers computer is frustrating... Luckily he's awesome and said he dabbles in c++ and has a compiler and might be able to run it :)
Image
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Distributing SDL Projects With Visual Studio

Post by eatcomics »

I just compiled in release mode, I'll test when I get back to school next tuesday XD
Image
Post Reply