Compiling the Editor on Windows

Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Compiling the Editor on Windows
Shock Trooper
Member # 7662
Profile #0
Does anyone know how to compile the 3D Editor source code on Windows? I have the Dev C++ compiler and I can't compile because I keep getting errors, only about 11 of them. (Which is a lot lot less than trying to compile the official BoA Editor.)

I am starting to port the Exile classic "Shadow of the Stranger", and I need to handle the dead zone of terrain types 122:169, the zone where the editor assigns the terrain translations. (Here I can't just hex - edit the editor's translation tables.)
Posts: 292 | Registered: Monday, November 13 2006 08:00
Infiltrator
Member # 5576
Profile Homepage #1
I was using Dev C++ to recompile the code a while back and had no major difficulty. What were the error messages you saw?

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Shock Trooper
Member # 7662
Profile #2
I am using ver 4 Bloodshed Dev C++ on Windows XP.

Actually there were 31 errors, the ones listed below were reported in the message window. For brevity's sake I omitted most of the "warning: `#pragma once' is obsolete" messages. I just add the cpp and h files then try to compile.

In file included from c:\program files\blades of avernum\blades
editor\win3dreleasesource\source\townout.cpp:1:
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\stdafx.h:3: warning: `#pragma once' is obsolete

c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a editor.cpp:280: ANSI C++ forbids implicit conversion from `void *' in argument passing

In file included from c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp:26:
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp: In function `bool init_directories_with_user_input(char *)':
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp:412: warning: NULL used in arithmetic
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp: In function `void port_boe_out_data()':
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp:2208: warning: comparison is always true due to limited range of data type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp: In function `void clean_str(char *)':
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp:4595: implicit declaration of function `int isalpha(...)'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\bl a fileio.cpp:4595: implicit declaration of function `int isdigit(...)'
In file included from c:\program files\blades of avernum\blades editor\win3dreleasesource\source\cmemstream.cpp:1:
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\StdAfx.h:3: warning: `#pragma once' is obsolete
In file included from c:\program files\blades of avernum\blades editor\win3dreleasesource\source\cmemstream.cpp:2:
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:238: ANSI C++ forbids declaration `INT_PTR' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:238: warning: `__stdcall__' attribute directive ignored
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:238: parse error before `('
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp: In function `short int cd_create_dialog(short int, HWND__ *)':
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:619: `dummy_dialog_proc' undeclared (first use this function)
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:619: (Each undeclared identifier is reported only once
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:619: for each function it appears in.)
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp: At top level:
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:645: ANSI C++ forbids declaration `INT_PTR' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:645: warning: `__stdcall__' attribute directive ignored
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:645: redefinition of `int INT_PTR'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:238: `int INT_PTR' previously declared here
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:645: parse error before `('
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:656: ANSI C++ forbids declaration `free_slot' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:659: parse error before `switch'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:664: ANSI C++ forbids declaration `dlgs' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:664: variable-size type declared outside of any function
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:664: conflicting types for `int dlgs[2]'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:85: previous declaration as `struct HWND__ * dlgs[15]'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:675: invalid initializer
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:677: parse error before `for'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:677: parse error before `;'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:677: syntax error before `++'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:680: ANSI C++ forbids declaration `str_offset' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:680: conflicting types for `int str_offset'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:652: previous declaration as `short int str_offset'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:681: ANSI C++ forbids declaration `dlg_highest_item' with no type
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:681: variable-size type declared outside of any function
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:681: conflicting types for `int dlg_highest_item[2]'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:87: previous declaration as `short int dlg_highest_item[15]'
c:\program files\blades of avernum\blades editor\win3dreleasesource\source\dlogtool.cpp:681: `i' was not declared in this scope
c:\program files\blades of avernum\blades
Posts: 292 | Registered: Monday, November 13 2006 08:00
Infiltrator
Member # 5576
Profile Homepage #3
Ok, some of these aren't bad, you'll just have to go through and fix them. Not having the code in front of me I can't handle them all, but I think I can point out what to do about a few:

- '#pragma once' is a nonstandard compiler directive to insure that a file is included only once to in other files that might otherwise include it via two different paths. The correct replacement is an
include guard .

- 'isdigit' and 'isalpha' should come from ctype.h, make sure that it is included in the files where the errors referring to these functions occur.

- concerning 'implicit conversion from `void *' ' I would try making sure to use an explict cast so that the type of the parameter matches the type expected by the function.

- Most of the rest stem from the compiler being confused by that INT_PTR CALLBACK thing. To be honest i don't know what that is; it looks like something that comes from windows.h, so you might take a look at this , it appears to explain some of this stuff.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Shock Trooper
Member # 7662
Profile #4
Kelandon’s site has the Comprehensive BoA Links page, towards the end of it you will find the BoA Editor Re-Make Project entry, with a link to the relevant area on the Sourceforge site. The source code is found at this address:
http://sourceforge.net/project/showfiles.php?group_id=129871

I am of course attempting to use the Windows code, I think there was only one version of it ever released.

Now the Editor was developed by a group under Kernel Knowledge, he said he uses KDevelop, which I think is a Linux program. There may be a few language – dependent things in the code.

I will now have to try out the suggestions you made, so far not a lot of luck.
Posts: 292 | Registered: Monday, November 13 2006 08:00