Project file for devcpp

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

Moderator: Forum Moderators

Post Reply
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Project file for devcpp

Post by spbrown »

Where is the wesnoth.dev project file for Devcpp ?
There are instructions on this website for compiling Wesnoth from source using devcpp, but the 1.2.4 source download only has project files for VC++.
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

This thread has some more info http://www.wesnoth.org/forum/viewtopic.php?t=15948

Not sure whether the wesnoth.dev in 1.2 is up to date (I don't use it), if it not in the source you can grab it here http://svn.gna.org/viewcvs/wesnoth/tags ... iew=markup
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Post by Mist »

Dev-C++ has an option to import VC++ projects. File -> import, can't really miss it, so no dedicated project file needed. And besides, it's actualy better to use the one for Visual as developers compile in that IDE (no developer uses Dev as far as I know) and it will be up to date.
Somewhere, between the sacred silence and sleep.
Disorder.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

Okay, thanks for that. I will try importing the VC++ project file.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

I imported the project file to devcpp,
and when I compile wesnoth, I get the following linker errors:

src/about.obj:about.cpp:(.text+0x31e4): undefined reference to `font::LARGE_TEXT' src/about.obj:about.cpp:(.text+0x32f2): undefined reference to `font::LARGE_TEXT'
src/about.obj:about.cpp:(.text+0x36a9): undefined reference to `font::draw_text(CVideo*, SDL_Rect const&, int, SDL_Color const&, std::string const&, int, int, bool, int)'
src/about.obj:about.cpp:(.text+0x3eea): undefined reference to `font::SMALL_TEXT'
src/ai.obj:ai.cpp:(.text+0x27): undefined reference to `events::generic_event::notify_observers()'
src/ai.obj:ai.cpp:(.text+0xa2b): undefined reference to `events::generic_event::notify_observers()'
src/ai.obj:ai.cpp:(.text+0x1149): undefined reference to `events::generic_event::notify_observers()'
src/ai.obj:ai.cpp:(.text+0x25a9): undefined reference to `events::generic_event::generic_event(std::string)'
Zebulon
Art Developer
Posts: 298
Joined: September 7th, 2005, 11:30 pm
Location: Wyoming

Post by Zebulon »

You need to add generic_event.cpp?

Mist wrote:(no developer uses Dev as far as I know)
I think Darth Fool uses it.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

I added generic_event, and those error messages are gone,
but I still have error messages for font. Some of the source files refer to an old version of font.cpp, not the version which is in my src folder.
src/about.obj:about.cpp:(.text+0x31e4): undefined reference to `font::LARGE_TEXT'

src/about.obj:about.cpp:(.text+0x32f2): undefined reference to `font::LARGE_TEXT'
src/about.obj:about.cpp:(.text+0x36a9): undefined reference to `font::draw_text(CVideo*, SDL_Rect const&, int, SDL_Color const&, std::string const&, int, int, bool, int)'
src/about.obj:about.cpp:(.text+0x3eea): undefined reference to `font::SMALL_TEXT'
src/widgets/button.obj:button.cpp:(.text+0x2f4): undefined reference to `font::draw_text(CVideo*, SDL_Rect const&, int, SDL_Color const&, std::string const&, int, int, bool, int)'
src/widgets/button.obj:button.cpp:(.text+0x9f5): undefined reference to `font::draw_text(CVideo*, SDL_Rect const&, int, SDL_Color const&, std::string const&, int, int, bool, int)'
6): undefined reference to `font::BAD_TEXT'
Do I need to replace my current version of font.cpp with an older one?
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Post by Mist »

No, linker didn't find freetype. Check if you have freetype2, include libfreetype in compiling, and have includes in correct place (my compiler was looking for it at /include/freetype and that particular reference was hardfixed in scripts so for example having them at /include/ threw errors)
Somewhere, between the sacred silence and sleep.
Disorder.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

I still have the same error.

I downloaded freetype as per the Devcpp Wesnoth installation instructions.
I have put C:\Dev-Cpp\include\freetype in the include directories in the Project Options and libfreetype.dll.a is in the lib folder, which is also in the Project Options.

These are my compiler and linker settings:
Compiler:
D__GNUWIN32__ -W -fexceptions -DWIN32 -D_DEBUG -DDEBUG -D_WINDOWS -D_MBCS

Linker:
-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lSDL -lSDLmain -lSDL_mixer -lSDL_net -lSDL_image -llibintl -lfreetype -lWs2_32 -lpython24
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Post by Mist »

Try with this .dev file and tell me what you get. It might get quite while to compile because of optimistions flags.
Attachments
wesnoth.zip
(2.76 KiB) Downloaded 268 times
Somewhere, between the sacred silence and sleep.
Disorder.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

I tried your project file, and this time I got it to compile after adding the mouse and widgets/filechooser files to the project.
When I tried to run the .exe file however, I got an error message about not being able to find the procedure entry point SDL_strlcat from the dynamic link library SDL.dll.
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Post by Mist »

After compilation you need to copy all .dll files from dev-cpp/bin directory to either wesnoth main (the same that has wesnoth.exe) or windows/system32. Check standart relase build and see what .dll it has there.
Somewhere, between the sacred silence and sleep.
Disorder.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

I have copied the following files from Dev-Cpp/bin to the directory with wesnoth.exe in it, but the error still occurs:

libgettextpo.dll
libgettextsrc.dll
libiconv2.dll
libintl3.dll
libexpat.dll
libgettextlib.dll
libpng13.dll
librle3.dll
libcurl.dll
gettextsrc.dll
ogg.dll
iconv.dll
intl.dll
jpeg62.dll
gettextlib.dll
gettextpo.dll
zlib1.dll
charset.dll
freetype6.dll
vorbis.dll
jpeg.dll
libpng12.dll
libtiff.dll
vorbisfile.dll
SDL_image.dll
SDL_mixer.dll
python24.dll
SDL_net.dll
smpeg.dll
SDL.dll
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Post by Mist »

This probably means your copy of SDL.dll is broken. Try with those .dlls
Attachments
SDL.zip
(232.9 KiB) Downloaded 262 times
Somewhere, between the sacred silence and sleep.
Disorder.
spbrown
Posts: 11
Joined: April 18th, 2007, 2:58 pm

Post by spbrown »

Wesnoth is working now!
Thank you :)
Post Reply