| Author |
Message |
dcbasic
Don't Hurt Me


Joined: 18 Jan 2008
Last Visit: 05 Oct 2009
Topics: 4
Posts: 62

|
Posted: Tue Jul 01, 2008 10:08 pm
Subject: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

 
|
|
If you're having trouble figure out what tools are needed to compile Wolf4SDL then read this. I'm going to show you how to setup Code::Blocks, an excellent open-source IDE and SDL. These instructions assume you know how to navigate through folders and extract compressed archives. It also assumes Code::Blocks is installed at C:\Program Files\CodeBlocks.
WARNING! These instructions are for Windows only!
What you will need
NOTE! Make sure you install the MinGW compiler when installing Code::Blocks!
NOTE: I have written a batch file to automatically setup SDL and SDL Mixer for Code::Blocks. If you want to use it instead to setting them up yourself you can find the download over here. Once SDL is installed you can go on to the third section (Configuring SDL & SDL Mixer with the Wolf4SDL Code::Blocks project file). If you have downloaded my batch file, it's unnecessary to download SDL or SDL_mixer since it includes SDL and SDL's DLL files...
Setting up SDL
- Extract SDL to it's own folder.
- Open the include folder that is inside the extracted SDL folder.
- Open C:\Program Files\CodeBlocks\MinGW\include.
- Copy\Move the SDL folder from step 2 to the Code::Blocks include folder in step 3.
- Open the lib folder that is inside the extracted SDL folder.
- Open C:\Program Files\CodeBlocks\MinGW\lib.
- Copy\Move the three files from step 5 to the Code::Blocks lib folder in step 6.
Setting up SDL Mixer
- Extract SDL Mixer to it's own folder.
- Open the include folder that is inside the extracted SDL Mixer folder.
- Open C:\Program Files\CodeBlocks\MinGW\include\SDL.
- Copy\Move the SDL_mixer.h file from step 2 to the Code::Blocks include\SDL folder in step 3.
- Open the lib folder that is inside the extracted SDL Mixer folder.
- Open C:\Program Files\CodeBlocks\MinGW\lib.
- Copy\Move the SDL_mixer.lib file from step 5 to the Code::Blocks lib folder in step 6.
Configuring SDL & SDL Mixer with the Wolf4SDL Code::Blocks project file
- Extract the Wolf4SDL source code to it's own folder.
- Open Wolf4SDL.cbp inside Code::Blocks.
- Goto Project > Build options....
- Select Wolf4SDL (the parent node of the tree list).
- Click the main tab Search directories and edit the current path to SDL in the Compiler and Linker tabs respectively to C:\Program Files\CodeBlocks\MinGW\include\SDL and C:\Program Files\CodeBlocks\MinGW\lib.
Compiling Wolf4SDL
- Make sure Wolf4SDL is the active project if you have another project opened. You can activate your Wolf4SDL project by right-clicking Wolf4SDL in the project management list and clicking Activate project.
- Goto Build > Build.
Running Wolf4SDL
- Open the bin folder that is inside the extracted SDL folder.
- Open the folder you extracted Wolf4SDL's source code to.
- Copy\Move the SDL.dll file from step 1 to the folder in step 2.
- Open the lib folder that is inside the extracted SDL Mixer folder.
- Copy\Move the SDL_mixer.dll file from step 4 to the folder in step 2.
- Run Wolf4SDL.exe.
|
Last edited by dcbasic on Mon Sep 15, 2008 7:19 pm; edited 1 time in total
|
|
 |
TheTalentedMrLeo
DieHard Officer


Joined: 15 Mar 2003
Last Visit: 08 Feb 2010
Topics: 27
Posts: 522

|
Posted: Thu Jul 03, 2008 3:10 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Moving to Code Tutorials... |
|
|
|
 |
Ripper
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008
Topics: 21
Posts: 527
Location: Germany

|
Posted: Sun Jul 13, 2008 11:48 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Nice tutorial. Good work! |
_________________ Life is an awful game, but the graphics resolution rocks ;D
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Fri Dec 05, 2008 10:11 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
I tried setting the compiler up, as it says in the tutorial, but whenever I try to build anything, it states: "#error You should copy include/SDL_config.h.default to include/SDL_config.h"
How do I fix this problem? Since I can't seem to find any way to fix it on my own. (I'm sorry to say that I'm not C++ savvy at the moment, this usually happens whenever I have to switch to a new compiler) |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
StoneFrog
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009
Topics: 8
Posts: 36
Location: New Jersey

|
Posted: Fri Dec 05, 2008 11:20 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Did you add your SDL files via the batch file written by dcbasic, or did you download the zips and install them yourself? I got some similar error with the batch (it's probably obsolete with the current Code::Blocks setup somehow), and when I started over and installed the files myself all was well. |
|
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 12:15 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
I tried the batch, but my computer won't allow access to it, so i did it myself (using the files found with the batch, I manually moved them following the steps listed above)
It might be a missing file, but I'm not fully sure. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
StoneFrog
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009
Topics: 8
Posts: 36
Location: New Jersey

|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 1:16 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| I did download those, but I don't think that I've tried them, let me check. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 1:22 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Okay, nope, still not workin'. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
AlumiuN
DieHard Wolfer

Joined: 30 Nov 2007
Last Visit: 01 Feb 2010
Topics: 13
Posts: 1141
Location: Christchurch, New Zealand

|
Posted: Sat Dec 06, 2008 4:45 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
Try going into the include folder in the Code::Blocks directory and copying sdl_config.h.default to the same directory as sdl_config.h .  |
_________________ Does this seem like a signature to you?
ctalyst666@gmail.com (spam can get filtered )
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 5:45 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| That would seem to be the solution at first, but I don't have a file like that in any of the directories. Perhaps the file I downloaded simply did not contain the file, I am unsure. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
StoneFrog
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009
Topics: 8
Posts: 36
Location: New Jersey

|
Posted: Sat Dec 06, 2008 3:26 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
It should be within your \include\SDL\ directory (as if you didn't already know that thanks to the error message).
I use Dev-C++ so I'm not sure, but I think Dev-C++ included some of the SDL files. Are you using Code::Blocks? |
|
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 3:33 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Code Blocks, indeed. I looked within the file, and I even tried making a psuedo version from the same file, trying to somewhat appease it, and that did not fix anything. I tried Dev-C++, but I get lots of error warnings with that one, saying that instead, the code I'm using is outrageously flawed. (BTW I'm using the activision version of the code if that somehow makes a difference) |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
StoneFrog
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009
Topics: 8
Posts: 36
Location: New Jersey

|
Posted: Sat Dec 06, 2008 5:51 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
I could've sworn Wolf4SDL only has one source code, but you can modify #indefs to change the versions and whatnot. Mine, at least, is initially coded for the activision version.
Are you sure you're setting up your files properly? I had no issues with Dev-C++ compiling mine. Make sure you have the mingw32 and developer versions of all the SDL files. |
|
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 6:36 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
Sorry, got a bit confused, I'm using the regular source code (there is no second type, I just have two types of the Wolf4SDL exe's that I downloaded)
I guess I'll try fixing it, now I just need to find the mingw32 files I guess, and see if I can't get Dev-C++ to work properly. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 6:58 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Okay, I tried it and nope, couldn't get it to work. When I try to use Dev-c++ it usually says the first thing that somethign is wrong with the wl_text.cpp file, and won't go past there. Is there a tutorial for setting it up or something that I could look at? Cause, I'm growing weary of this. (this happened with my first compiler, the Boarland C+ compiler, back when I first started coding) |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sat Dec 06, 2008 7:57 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
Okay, I tried another tactic, I completely deleted all of the Dev-C++ and Code::Blocks files and then reinstalled what I was supposed to, and followed all of the instructions to the letter, and now, it just got me back to where I was in the first place. "c:\program files\codeblocks\mingw\include\sdl\SDL_config.h|34|fatal error C1189: #error : You should copy include/SDL_config.h.default to include/SDL_config.h|"
I did notice that there was a section that said, "Make sure that this isn't included by Visual C++" But I'm not quite sure how to do that either. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sun Dec 07, 2008 8:07 am
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

  
|
|
| Well, I've tried three different compilers now, I've tried to find the above mentioned missinng file, I've tried every (illegible) thing I could think of, I'm tired, I want to know EXACTLY how someone else set theirs up, images, previews, anything! I'd accept them through email, just so I can get through with this (illegible) and get on to doing what I love (making Wolfenstein mods, not (illegible) around with this crap) |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
StoneFrog
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009
Topics: 8
Posts: 36
Location: New Jersey

|
|
 |
Metalor
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.
Topics: 52
Posts: 411
Location: California

|
Posted: Sun Dec 07, 2008 6:00 pm
Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
[ IP : Logged ]
|

 
|
|
| I eamnt that I have the regular "Wolf4SDL" source code, and I have the binary exe's for the Activision and Apogee Wolf4SDL. Real quick question, does your C++ configuration have the SDL_config.h.default file, or is there a special configuration to your compiler? I just want to be sure, because the smallest change can mean a world of difference when it comes to this sort of thing. |
_________________ There are no such things as "Heroes," Only villians that do good!
|
|
 |
|
|