DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Tutorial] Compiling Wolf4SDL with Code::Blocks
Page 1 of 2 Goto page 1, 2  Next
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
dcbasic
Don't Hurt Me
Don't Hurt Me


Joined: 18 Jan 2008
Last Visit: 05 Oct 2009

Topics: 4
Posts: 62

blank.gif

PostPosted: Tue Jul 01, 2008 10:08 pm
   Subject: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

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
  1. Extract SDL to it's own folder.
  2. Open the include folder that is inside the extracted SDL folder.
  3. Open C:\Program Files\CodeBlocks\MinGW\include.
  4. Copy\Move the SDL folder from step 2 to the Code::Blocks include folder in step 3.
  5. Open the lib folder that is inside the extracted SDL folder.
  6. Open C:\Program Files\CodeBlocks\MinGW\lib.
  7. Copy\Move the three files from step 5 to the Code::Blocks lib folder in step 6.

Setting up SDL Mixer
  1. Extract SDL Mixer to it's own folder.
  2. Open the include folder that is inside the extracted SDL Mixer folder.
  3. Open C:\Program Files\CodeBlocks\MinGW\include\SDL.
  4. Copy\Move the SDL_mixer.h file from step 2 to the Code::Blocks include\SDL folder in step 3.
  5. Open the lib folder that is inside the extracted SDL Mixer folder.
  6. Open C:\Program Files\CodeBlocks\MinGW\lib.
  7. 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
  1. Extract the Wolf4SDL source code to it's own folder.
  2. Open Wolf4SDL.cbp inside Code::Blocks.
  3. Goto Project > Build options....
  4. Select Wolf4SDL (the parent node of the tree list).
  5. 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
  1. 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.
  2. Goto Build > Build.

Running Wolf4SDL
  1. Open the bin folder that is inside the extracted SDL folder.
  2. Open the folder you extracted Wolf4SDL's source code to.
  3. Copy\Move the SDL.dll file from step 1 to the folder in step 2.
  4. Open the lib folder that is inside the extracted SDL Mixer folder.
  5. Copy\Move the SDL_mixer.dll file from step 4 to the folder in step 2.
  6. Run Wolf4SDL.exe.


Last edited by dcbasic on Mon Sep 15, 2008 7:19 pm; edited 1 time in total
TheTalentedMrLeo
DieHard Officer
DieHard Officer


Joined: 15 Mar 2003
Last Visit: 08 Feb 2010

Topics: 27
Posts: 522

usa.gif

PostPosted: Thu Jul 03, 2008 3:10 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Sun Jul 13, 2008 11:48 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Nice tutorial. Good work!

_________________
Life is an awful game, but the graphics resolution rocks ;D
Metalor
DieHard SS
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Fri Dec 05, 2008 10:11 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009

Topics: 8
Posts: 36
Location: New Jersey
usa.gif

PostPosted: Fri Dec 05, 2008 11:20 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 12:15 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009

Topics: 8
Posts: 36
Location: New Jersey
usa.gif

PostPosted: Sat Dec 06, 2008 12:33 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's not the batch file's specific instructions, but the files that are outdated, I think.

I'm referring to downloading these:

dcbasic wrote:

[*]SDL Devel Win32\MinGW - http://www.libsdl.org/download-1.2.php
[*]SDL Mixer Devel Win32 - http://www.libsdl.org/projects/SDL_mixer/


...and trying to install them per his instructions. Good luck.
Metalor
DieHard SS
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 1:16 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 1:22 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Okay, nope, still not workin'.

_________________
There are no such things as "Heroes," Only villians that do good!
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 30 Nov 2007
Last Visit: 01 Feb 2010

Topics: 13
Posts: 1141
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sat Dec 06, 2008 4:45 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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 . Smile

_________________
Does this seem like a signature to you?

ctalyst666@gmail.com (spam can get filtered Very Happy)
Metalor
DieHard SS
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 5:45 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009

Topics: 8
Posts: 36
Location: New Jersey
usa.gif

PostPosted: Sat Dec 06, 2008 3:26 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 3:33 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009

Topics: 8
Posts: 36
Location: New Jersey
usa.gif

PostPosted: Sat Dec 06, 2008 5:51 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 6:36 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 6:58 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sat Dec 06, 2008 7:57 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sun Dec 07, 2008 8:07 am
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

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
Can I Play Daddy


Joined: 30 Nov 2008
Last Visit: 26 Jul 2009

Topics: 8
Posts: 36
Location: New Jersey
usa.gif

PostPosted: Sun Dec 07, 2008 4:55 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Metalor wrote:
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)


The non-SDL source code? I think that will explode with the compilers used for SDL compiling!

I don't know how you can have two types of the Wolf4SDL exe. Are you talking about the "Apogee Shareware" "Apogee 1.4" "Activision" "Spear Demo" and "Spear of Destiny" downloads? Those are irrelevant and for PLAYING said games in SDL form.

You want this.

Sorry if you do have that and I'm not reading you correctly, I'm not a big C++ aficionado myself so I'm giving you all the generic tech support-esque answers. Embarassed
Metalor
DieHard SS
DieHard SS


Joined: 24 Aug 2005
Last Visit: 4:33 ago.

Topics: 52
Posts: 411
Location: California
usa.gif

PostPosted: Sun Dec 07, 2008 6:00 pm
   Subject: Re: [Tutorial] Compiling Wolf4SDL with Code::Blocks
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

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!
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 2 Goto page 1, 2  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Announcement: Wolf4SDL released
Author: Ripper
387 9123 Thu Dec 31, 2009 5:10 am
AlumiuN View latest post
No new posts [help] Adding teleporters in wolf4sdl
Author: Mortimer
28 499 Fri Feb 13, 2009 8:55 pm
Codetech84 View latest post
No new posts [WOLF4SDL Help] Blake Stone Style doors
Author: Haasboy
3 196 Sun Jul 20, 2008 2:56 pm
Haasboy View latest post
No new posts [help] Wolf4sdl's implemented tutorials
Author: Mortimer
6 243 Tue May 06, 2008 8:15 pm
Ripper View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 229 Sun Apr 27, 2008 9:30 am
AlumiuN View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subSilver Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group