How to compile Wesnoth on Windows with Dev-Cpp, Code::Blocks

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Locked
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

Code::Blocks seems to be nice, maybe I'll switch my IDE.
wesnoth_gcc4.dev (some posts before) was updated (new file src/gui/dialogs/title_screen.cpp)
Tillanz
Posts: 11
Joined: March 9th, 2008, 7:10 am

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by Tillanz »

Thanks talosds, your solution (downloading gimp and copying the dlls) worked perfectly.
BroodKiller
Posts: 30
Joined: August 12th, 2008, 9:24 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by BroodKiller »

Thanks for help talosds, I added your link to the main guide. One important thing that I'd like to mention is that the attached CodeBlocks project file works as long as you want just to build the game itself, and may not necessarily work if you'd like to do some development with it, as some new files may be missing from it. In this case you may have to add these new files to the project manually.

Just to let you know - the compiler warnings are there for me as well, but I simply ignore them. They don't show up in DevCpp though, so it must be a CB-specific thing. They are not really a nuisance, so I didn't bother tracking them down.

McShark: CodeBlocks has its flaws but it's a very good IDE in my opinion. I did some wesnoth codework with both DevCpp and CodeBlocks, and I must say that to me CB is more friendly and works faster (a noticeable thing on a 2x1.66GHz, e.g loading a wesnoth project file takes ages in DevCpp). I admit that I've been using CB for some time already so my opinion may be biased, so you'd best just check it out yourself.

PS:I think adding "(...) or CodeBlocks" to the topic's title may be helpful and more descriptive.
Clean...Simple...Devious...I like it
BroodKiller
Posts: 30
Joined: August 12th, 2008, 9:24 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by BroodKiller »

Building the latest 1.5.3 trunk under windows may require some extra libraries (e.g. fontconfig and libexpat) ontop of what is in the guide. You can find them here as 3rd-party GTK+ dependencies:
http://www.gtk.org/download-windows.html
Clean...Simple...Devious...I like it
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

I took these two and the recent trunk. Here are newer files (with fridibi and editor2).
The .dev-files result in the according filenames for executable (filename.exe),
the .cbp-files result in filename_cb.exe.
Last edited by McShark on December 14th, 2008, 6:34 pm, edited 2 times in total.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

The files were updated again:
  • no extra project files for editor anymore
  • editor included in wesnoth project files
Have fun!
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

Completely new files for svn.
CodeBlocks: New File wesnoth.workspace containing all wesnoth codeblock project files.
Dev-C++ & CodeBlocks: Use icons (folder packaging/windows) for wesnoth executable (as soon as there is some icon for wesnothd it will follow)

If you used CodeBlocks before, you should move the .objs-folder to /projectfiles/CodeBlocks. I tried to do this for Dev-C++, too (to keep src clean) but the .objs folder has no subfolders and therefore all .o have to stay in src.
Last edited by McShark on December 14th, 2008, 6:33 pm, edited 1 time in total.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

Updated the files: both wesnoth executables use the icon now and editor icon was removed from wesnothd. (Should anybody post an icon for wesnothd?)
ivan
Posts: 15
Joined: April 28th, 2008, 12:42 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by ivan »

Something tells me that you should at least compile python25.dll yourself from source on Windows using the same compiler as for wesnoth, don't use the standard .dll as described in this guide. Or am I missing something?
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

I've used the standard dll by installing phyton (or maybe the one from my previous wesnoth install).
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by loonycyborg »

ivan wrote:Something tells me that you should at least compile python25.dll yourself from source on Windows using the same compiler as for wesnoth, don't use the standard .dll as described in this guide. Or am I missing something?
I tried compiling python25.dll myself to get rid of msvcr71.dll dependency, but unfortunately python's autotools build system doesn't seem to work on windows with mingw. Anyway, in my experience, dlls compiled with mingw are interchangeable with dlls compiled with msvc.
"meh." - zookeeper
ivan
Posts: 15
Joined: April 28th, 2008, 12:42 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by ivan »

loonycyborg wrote:
ivan wrote:Something tells me that you should at least compile python25.dll yourself from source on Windows using the same compiler as for wesnoth, don't use the standard .dll as described in this guide. Or am I missing something?
I tried compiling python25.dll myself to get rid of msvcr71.dll dependency, but unfortunately python's autotools build system doesn't seem to work on windows with mingw. Anyway, in my experience, dlls compiled with mingw are interchangeable with dlls compiled with msvc.
They may work. But not everything works in multi-compiler environment. Some low-level things may crash.

http://www.python.org/doc/faq/windows/# ... pplication
ivan
Posts: 15
Joined: April 28th, 2008, 12:42 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by ivan »

This link may help for mingw Python compiling:
http://python-mingw.donbennett.org/

UPDATE: Slightly outdated Python compiled with mingw is available here

Those who use free VS Express probably should compile Python themselves too. AFAIK it will compile from official source project files without any problems.
User avatar
McShark
Posts: 76
Joined: March 19th, 2008, 10:41 pm

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by McShark »

Updated project files for y'all - Added dialogs/wml_message.cpp and overide exe-name with xyz_cb
Last edited by McShark on December 14th, 2008, 6:33 pm, edited 1 time in total.
Cliff
Posts: 14
Joined: October 19th, 2006, 3:12 am

Re: How to compile Wesnoth on Windows with Dev-Cpp

Post by Cliff »

Hi BroodKiller ,

I compiled BFW with codeBlocks as what you said(using wesnoth_gcc4.cbp). It's OK except adding some source files into project file. And then, I copied the .dll files into the wesnoth directory.
However, there is the following error message when I startup the wesnoth_gcc4.exe:
"The procedure entry point libintl_snprintf could not be located in the dynamic link library intl.dll ".

can you help me? Thanks ahead.
Locked