Compilation of defs_modes.cpp

For those having trouble installing/running the game or to report a bug

Moderator: Staff

nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Compilation of defs_modes.cpp

Postby nemesis » Fri May 20, 2011 8:39 am

I'm facing the problem, when compiling the latest code. All files will compile except for def_modes.cpp. I'm using Windows, Codeblocks (10.05) and the libraries rujasu uploaded some days ago. I also just updated my MinGW-GCC.

The message is:

Code: Select all

-------------- Build: Release Win32 in Allacrost ---------------

Compiling: src\modes\defs_modes.cpp
In file included from src\luabind/luabind/detail/convert_to_lua.hpp:28:0,
                 from src\luabind/luabind/detail/call_member.hpp:30,
                 from src\luabind/luabind/wrapper_base.hpp:31,
                 from src\luabind/luabind/back_reference.hpp:27,
                 from src\luabind/luabind/class.hpp:93,
                 from src\luabind/luabind/luabind.hpp:28,
                 from src\engine\script/script.h:41,
                 from src\common\global/global.h:28,
                 from src\modes\battle/battle.h:32,
                 from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:34:
src\luabind/luabind/detail/policy.hpp:211:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:264:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:316:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:372:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:418:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:470:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:514:36: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:597:32: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:772:32: warning: type qualifiers ignored on function return type
src\luabind/luabind/detail/policy.hpp:823:32: warning: type qualifiers ignored on function return type
In file included from src\engine\script/script.h:43:0,
                 from src\common\global/global.h:28,
                 from src\modes\battle/battle.h:32,
                 from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:34:
src\luabind/luabind/adopt_policy.hpp:55:36: warning: type qualifiers ignored on function return type
In file included from src\common\global/global.h:28:0,
                 from src\modes\battle/battle.h:32,
                 from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:34:
src\engine\script/script.h:140:41: warning: type qualifiers ignored on function return type
In file included from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:36:0:
src\modes\battle/battle_effects.h:85:30: warning: type qualifiers ignored on function return type
In file included from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:38:0:
src\modes\map/map.h:153:40: warning: type qualifiers ignored on function return type
In file included from src\modes\map/map_sprites.h:30:0,
                 from src\modes\map/map_events.h:34,
                 from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:40:
src\modes\map/map_objects.h:314:62: warning: type qualifiers ignored on function return type
Process terminated with status 1 (0 minutes, 8 seconds)
0 errors, 15 warnings


It's strange since there were only warning but no errors. But nevertheless, compilation is aborted. However, going back to Rev#1893 (for only this file), compilation gives also the same 15 warnings, but is not aborted.

Code: Select all

Compiling: src\modes\defs_modes.cpp
...
In file included from src\modes\map/map_sprites.h:30:0,
                 from src\modes\map/map_events.h:34,
                 from C:\Dokumente und Einstellungen\pawlak\Desktop\Allacrost\src\modes\defs_modes.cpp:40:
src\modes\map/map_objects.h:314:62: warning: type qualifiers ignored on function return type
Linking executable: AllacrostWin.exe
Output size is 9,40 MB
Process terminated with status 0 (0 minutes, 28 seconds)
0 errors, 15 warnings


Did anyone face this problem?
Last edited by nemesis on Mon May 23, 2011 11:53 am, edited 1 time in total.
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Compilation of def_modes.cpp

Postby nemesis » Fri May 20, 2011 12:33 pm

I performed a few more tests:

  • #1895 okay
  • #1896 not okay
  • #1897 not okay
  • #1898 okay (although no change in def_modes.cpp) :shrug:
  • #1899 okay
  • #1900 not okay -> #1906 not okay

In all cases, not okay means compilation stopped at def_modes.cpp.
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Compilation of def_modes.cpp

Postby nemesis » Fri May 20, 2011 1:23 pm

Going deeper into this issue.

I've checked the changes from Rev#1897 -> #1898.

The changed lines

Code: Select all

   void WriteUIntVector(const std::string &key, std::vector<uint32> &vect)
      { _WriteDataVector(key, vect); }

   void WriteUIntVector(const int32 key, std::vector<uint32> &vect)
      { _WriteDataVector(key, vect); }

with to original (#1897)

Code: Select all

std::vector<int32> &vect

changed to (#1898)

Code: Select all

std::vector<uint32> &vect

enabels compilation for me. However, when def_modes.cpp was changed again (#1900), it again doesn't compile anymore. I'm not yet familiar with Luabind, but it seems, some wrong data types may cause this issue (at least on a Windows system).
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Compilation of def_modes.cpp

Postby nemesis » Fri May 20, 2011 5:06 pm

Something more for the headache. :bang:

As I told, #1899 works, but not #1900. The funny thing is, using all files from #1900 and def_modes.cpp from #1896 doesn't compile, but using def_modes.cpp from #1893 does.

So I've checked the changes of def_modes.cpp from #1893 to #1896.

The following lines were added:

Code: Select all

   module(hoa_script::ScriptManager->GetGlobalState(), "hoa_map")
   [
      class_<ResidentZone, MapZone>("MapZone")
         .def(constructor<>())
         .def(constructor<uint16, uint16, uint16, uint16>())
         .def(constructor<uint16, uint16, uint16, uint16, MAP_CONTEXT>())
         .def("IsResidentEntering", &ResidentZone::IsResidentEntering)
         .def("IsResidentExiting", &ResidentZone::IsResidentExiting)
         .def("IsSpriteResident", (bool(ResidentZone::*)(uint32)const)&ResidentZone::IsSpriteResident)
         .def("IsSpriteResident", (bool(ResidentZone::*)(VirtualSprite*)const)&ResidentZone::IsSpriteResident)
         .def("IsCameraResident", &ResidentZone::IsCameraResident)
         .def("IsSpriteEntering", (bool(ResidentZone::*)(uint32)const)&ResidentZone::IsSpriteEntering)
         .def("IsSpriteEntering", (bool(ResidentZone::*)(VirtualSprite*)const)&ResidentZone::IsSpriteEntering)
         .def("IsCameraEntering", &ResidentZone::IsCameraEntering)
         .def("IsSpriteExiting", (bool(ResidentZone::*)(uint32)const)&ResidentZone::IsSpriteExiting)
         .def("IsSpriteExiting", (bool(ResidentZone::*)(VirtualSprite*)const)&ResidentZone::IsSpriteExiting)
         .def("IsCameraExiting", &ResidentZone::IsCameraExiting)
         .def("GetResident", &ResidentZone::GetResident)
         .def("GetEnteringResident", &ResidentZone::GetEnteringResident)
         .def("GetExitingResident", &ResidentZone::GetExitingResident)
         .def("GetNumberResidents", &ResidentZone::GetNumberResidents)
         .def("GetNumberEnteringResidents", &ResidentZone::GetNumberEnteringResidents)
         .def("GetNumberExitingResidents", &ResidentZone::GetNumberExitingResidents)
         .def("GetActiveContexts", &ResidentZone::GetActiveContexts)
         .def("SetActiveContexts", &ResidentZone::SetActiveContexts)
   ];


Just wanted to find the "error line".

Some results:

Code: Select all

    module(hoa_script::ScriptManager->GetGlobalState(), "hoa_map")
   [
      class_<ResidentZone, MapZone>("MapZone")
         .def(constructor<uint16, uint16, uint16, uint16>())
   ];

did compile.

Code: Select all

    module(hoa_script::ScriptManager->GetGlobalState(), "hoa_map")
   [
      class_<ResidentZone, MapZone>("MapZone")
         .def(constructor<>())
   ];

did not.
module(hoa_script::ScriptManager->GetGlobalState(), "hoa_map")
[
class_<ResidentZone, MapZone>("MapZone")
.def("SetActiveContexts", &ResidentZone::SetActiveContexts)
];

did compile.

Code: Select all

    module(hoa_script::ScriptManager->GetGlobalState(), "hoa_map")
   [
      class_<ResidentZone, MapZone>("MapZone")
         .def("GetActiveContexts", &ResidentZone::GetActiveContexts)
   ];

did not.

Sorry, I don't get it. :help: Does anyone have a clue?
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Compilation of def_modes.cpp

Postby Roots » Fri May 20, 2011 5:48 pm

That is very strange. I just did a complete clean rebuild of everything from the latest SVN and I had no problems with def_modes.cpp. I don't see any of those warnings you shared in your first post, nor do I recall ever having seen a warning like that. Have you done a make clean and make rebuild? Maybe there are some lingering compiled object files that are messing up the process.


Lets just focus on getting the latest revision of the code to work for now. You said revisions #1896 and #1897 were not okay, yet the latest commit you made was revision #1899 so things were obviously working then, right? (Unless you checked your code in before compiling it... :uhoh: ). And the changes that were made in #1897 => #1898 should have absolutely no effect on def_modes.cpp.


I think the most likely culprit is the update you did to MinGW-GCC. You said that after you updated it, everything stopped working, right? Unfortunately I know nothing about this build environment so all I can suggest is to check and make sure you didn't forget anything when updating the compiler (maybe some C++ run-time library updates you missed?). Hopefully rujasu can help you figure this one out when he gets off of work today.
Image
rujasu
Developer
Posts: 758
Joined: Sun Feb 25, 2007 5:40 am
Location: Maryland, USA

Re: Compilation of def_modes.cpp

Postby rujasu » Mon May 23, 2011 1:33 am

Odd. It's working fine for me. What version of MinGW-GCC is this? Also, have you done a full clean before building?
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Compilation of def_modes.cpp

Postby nemesis » Mon May 23, 2011 8:39 am

Okay, seems really to be again one of the MinGW-GCC issues.

I switched back to GCC3 and compilation works, but not linking.

However, I will try to get back to an older version of GCC4 (currently it was 4.5.2).

Thanks for your help so far.
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Compilation of defs_modes.cpp

Postby nemesis » Mon May 23, 2011 11:54 am

Okay, so I went back to MinGW-GCC 4.4.0, now everything works.

So maybe as a final message, there might be problems during compilation with GCC 4.5.0 under windows.
rujasu
Developer
Posts: 758
Joined: Sun Feb 25, 2007 5:40 am
Location: Maryland, USA

Re: Compilation of defs_modes.cpp

Postby rujasu » Mon May 23, 2011 5:45 pm

Okay. I was using 4.4.something, so I'll investigate with 4.5 or later. I know that on Linux I've been able to compile with 4.5 and 4.6, but there have been changes in their behavior.

Thanks for the information. :approve:

Return to “Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest