compiling almost done - problem with global.hpp

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

Moderators: Forum Moderators, Developers

Post Reply
ichbinsehselber
Posts: 13
Joined: September 8th, 2006, 2:22 pm

compiling almost done - problem with global.hpp

Post by ichbinsehselber »

I am trying to compile wesnoth on visual studio 8 for the first time. I use the instructions made by wintifax. In some cases I use more current versions of tools.

I have been able to fix most problems. There are some left now (apart from warnings of deprecated functions):

1.) 17 times the following error: ...\widget.cpp(14) : fatal error C1083: Cannot open include file: 'global.hpp': No such file or directory

I have checked that the file exists and that it is mentioned in the right directory in the project file. I have also looked into the file itself and did not find any problem.

Do you have any idea, what causes this error?

2.) parser.cpp
...\src\serialization\parser.cpp(16) : fatal error C1083: Cannot open include file: 'serialization/parser.hpp': No such file or directory

3.) playlevel.cpp
c1xx : fatal error C1083: Cannot open source file: '.\src\playlevel.cpp': No such file or directory

ichbinsehselber
Posts: 13
Joined: September 8th, 2006, 2:22 pm

Post by ichbinsehselber »

3.) playlevel.cpp is solved. It seems that this file has been removed in one of the latest release versions

ichbinsehselber
Posts: 13
Joined: September 8th, 2006, 2:22 pm

Post by ichbinsehselber »

it is very strange that the include global.hpp does not cause an error in some of the files

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni »

If you haven't done so already:

Add the main wesnoth source directory to the search path for non-system project include files. A number of the files in various subdirectories (particularly widgets and serialization) won't compile without this, and they fail by not finding various include files.

ichbinsehselber
Posts: 13
Joined: September 8th, 2006, 2:22 pm

Post by ichbinsehselber »

thanks you, zaimoni!
now I have the same problem as Saragar describes in a different thread (http://www.wesnoth.org/forum/viewtopic. ... 6227148cd5)
I'll try and see, if the instructions there help me.

ichbinsehselber
Posts: 13
Joined: September 8th, 2006, 2:22 pm

Post by ichbinsehselber »

after putting the libfreetype.lib as provided by Xan into the path, more linking errors appear:

Generating Code...
Linking...
about.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
loadscreen_empty.obj : error LNK2005: "public: void __thiscall loadscreen::set_progress(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?set_progress@loadscreen@@QAEXHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "public: void __thiscall loadscreen::increment_progress(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?increment_progress@loadscreen@@QAEXHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "public: void __thiscall loadscreen::clear_screen(bool)" (?clear_screen@loadscreen@@QAEX_N@Z) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "void __cdecl increment_filesystem_progress(void)" (?increment_filesystem_progress@@YAXXZ) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "void __cdecl increment_binary_wml_progress(void)" (?increment_binary_wml_progress@@YAXXZ) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "void __cdecl increment_set_config_progress(void)" (?increment_set_config_progress@@YAXXZ) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "void __cdecl increment_parser_progress(void)" (?increment_parser_progress@@YAXXZ) already defined in loadscreen.obj
loadscreen_empty.obj : error LNK2005: "public: static class loadscreen * loadscreen::global_loadscreen" (?global_loadscreen@loadscreen@@2PAV1@A) already defined in loadscreen.obj
LINK : fatal error LNK1104: cannot open file 'LIBCD.lib'

zaimoni
Posts: 281
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.
Contact:

Post by zaimoni »

You also don't need both loadscreen_empty.obj and loadscreen.obj. [This also gave me trouble when configuring my Python makefile leech script.] For the main client, you want loadscreen.obj [remove loadscreen_empty.cpp from the project].

No idea about the libcd.lib error.

Post Reply