Compilation problem

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Compilation problem

Post by meriton »

Hi all,

Trying to compile armagetron from the trunk, I get an error:

Code: Select all

Compiling: ..\..\src\network\nNetwork.cpp
..\..\src\network\nNetwork.cpp:67: error: `VERSION' was not declared in this scope
..\..\src\network\nNetwork.cpp: In function `void login_accept_handler(nMessage&)':
..\..\src\network\nNetwork.cpp:1368: error: `VERSION' undeclared (first use this function)
..\..\src\network\nNetwork.cpp:1368: error: (Each undeclared identifier is reported only once for each function it appears in.)
Process terminated with status 1 (0 minutes, 27 seconds)
I am using Windows and Code::Blocks. I followed the steps in "armagetronad\win32\windows_libraries.txt".

Output from update_version.bat:

Code: Select all

*** checking python
Python 2.4.1
 - Detected python
 Eingegebenes Datum kann nicht übernommen werden.
Geben Sie das neue Datum ein: (TT-MM-JJ) 25-06-06

*** reading SVN repository and revision
 - SVN: https://svn.sourceforge.net/svnroot/armagetronad/armagetronad/trunk/arma
getronad
 - SVN: 5035"/


*** generating version.h...
#define MINOR_VERSION _alpha5035"/ >> ..\build\tmp\help-30720.txt
#define VERSION "0.3_alpha5035"/" >> ..\build\tmp\help-30720.txt
 - Detected:
Der Befehl "Armagetron" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.


Do you want to update 'version.h' ? (requires full rebuild afterwards)
..\src\version.h überschreiben? (Ja/Nein/Alle): j
        1 Datei(en) kopiert.



done!
Does anyone have any clue what I am doing wrong?
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

What happens when you type "y" instead of "j"? Can't see it mattering, if the prompt says it takes German, but maybe it doesn't?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

Code: Select all

Do you want to update 'version.h' ? (requires full rebuild afterwards)
..\src\version.h überschreiben? (Ja/Nein/Alle): y
..\src\version.h überschreiben? (Ja/Nein/Alle): Y
..\src\version.h überschreiben? (Ja/Nein/Alle): Yes
..\src\version.h überschreiben? (Ja/Nein/Alle): j
        1 Datei(en) kopiert.
BTW, armagetronad/src/version.h reads:

Code: Select all

#define MAJOR_VERSION 0,3,0625 
#define BUILD_DATE "20060625" 
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Looks like it was generated wrong, to me. I don't really know because bootstrap.sh handles it in Linux, and I don't use Windows.

Try adding this to version.h:

Code: Select all

#define VERSION 0,3,0625
Hopefully someone who knows the windows build process will know what's wrong and what they can do to fix it and they'll do it. :)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

Seems like the shell script writes two defines to standard output instead of into the file. I modified the version.h to

Code: Select all

#define MAJOR_VERSION 0,3,0625 
#define BUILD_DATE "20060625" 
#define MINOR_VERSION _alpha5035
#define VERSION 0.3_alpha5035
It's compiling now, thanks for your help Lucifer :)

Edit: Argh, no it isn't. I'll try your version now, I don't trust the script anymore ...
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

That didn't work either, I tried the script's version, this time with quotes. that worked well enough for me to see the next error (output truncated):

Code: Select all

In file included from ..\..\src\tools\/tValue.h:40,
                 from ..\..\src\tools\tValue.cpp:28:
../../../winlibs/boost/includes/boost/shared_ptr.hpp:17:65: boost/config.hpp: No such file or directory
../../../winlibs/boost/includes/boost/shared_ptr.hpp:26:41: boost/detail/shared_count.hpp: No such file or directory
In file included from ..\..\src\tools\/tValue.h:40,
                 from ..\..\src\tools\tValue.cpp:28:
../../../winlibs/boost/includes/boost/shared_ptr.hpp:85: error: variable or field `sp_enable_shared_from_this' declared void
../../../winlibs/boost/includes/boost/shared_ptr.hpp:85: error: template declaration of `int boost::detail::sp_enable_shared_from_this'
../../../winlibs/boost/includes/boost/shared_ptr.hpp:85: error: `shared_count' was not declared in this scope
../../../winlibs/boost/includes/boost/shared_ptr.hpp:85: error: expected primary-expression before "const"
../../../winlibs/boost/includes/boost/shared_ptr.hpp:85: error: expected primary-expression before "const"
../../../winlibs/boost/includes/boost/shared_ptr.hpp:86: error: expected `;' before '{' token
../../../winlibs/boost/includes/boost/shared_ptr.hpp:90: error: variable or field `sp_enable_shared_from_this' declared void
../../../winlibs/boost/includes/boost/shared_ptr.hpp:90: error: `boost::detail::sp_enable_shared_from_this' declared as an `inline' variable
../../../winlibs/boost/includes/boost/shared_ptr.hpp:90: error: `shared_count' was not declared in this scope
../../../winlibs/boost/includes/boost/shared_ptr.hpp:90: error: expected primary-expression before '...' token
../../../winlibs/boost/includes/boost/shared_ptr.hpp:91: error: initializer expression list treated as compound expression
../../../winlibs/boost/includes/boost/shared_ptr.hpp:91: error: expected `,' or `;' before '{' token
../../../winlibs/boost/includes/boost/shared_ptr.hpp:340: error: using-declaration for non-member at class scope
../../../winlibs/boost/includes/boost/shared_ptr.hpp:340: error: expected `;' before "pn"
../../../winlibs/boost/includes/boost/shared_ptr.hpp: In constructor `boost::shared_ptr<T>::shared_ptr()':
../../../winlibs/boost/includes/boost/shared_ptr.hpp:119: error: class `boost::shared_ptr<T>' does not have any field named `pn'
../../../winlibs/boost/includes/boost/shared_ptr.hpp: In constructor `boost::shared_ptr<T>::shared_ptr(Y*)':
../../../winlibs/boost/includes/boost/shared_ptr.hpp:124: error: class `boost::shared_ptr<T>' does not have any field named `pn'
../../../winlibs/boost/includes/boost/shared_ptr.hpp:126: error: `pn' undeclared (first use this function)
../../../winlibs/boost/includes/boost/shared_ptr.hpp:126: error: (Each undeclared identifier is reported only once for each function it appears in.)
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

you need to install the boost library

it is located at www.boost.org

-ph
Canis meus id comedit.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

THis is missing includes. I haven't tried to build the trunk yet, and the 0.3.0 branch doesn't have the boost stuff in it.

boost/config.hpp
shared_ptr.hpp

You need to find those two header files and make sure the path to them is in your include search path somehow.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

Why is this dependency not reflected in the code::blocks workspace? Why is there no readme telling that the library is required and where it is expected to reside in the source tree?

It seems like it might be easier to use the branch instead as there shouldn't be any unresolved dependencies.

Update: Building the branch failed with:

Code: Select all

windres.exe: ..\\..\\src\\win32\\armagetron.rc:71: syntax error
Process terminated with status 1 (9 minutes, 39 seconds)
User avatar
joda.bot
Match Winner
Posts: 421
Joined: Sun Jun 20, 2004 11:00 am
Location: Germany
Contact:

Post by joda.bot »

Are you using the trunk ?

branch/0.3.0/armagetronad
and
branch/0.3.0/winlibs

should compile fine, I forgot to update the instructions in winlibs.txt sorry.

The latest information is on the wiki ... definitly should have this stuff in one place. http://wiki.armagetronad.net/index.php/ ... ent_System

The required boost headers are also in the winlibs module.
I might have to merge back some changes to trunk if z-man didn't do it already.
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

No, I'm now trying with a checkout of

https://svn.sourceforge.net/svnroot/arm ... ches/0.3.0

and get the error in the .rc file.

BTW, the update_version script fails for this branch, too:

Code: Select all

*** generating version.h...
#define MINOR_VERSION _alpha5415"/ >> ..\build\tmp\help-16140.txt
#define VERSION "0.3.0_alpha5415"/" >> ..\build\tmp\help-16140.txt
 - Detected:
Der Befehl "Armagetron" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

All I know is that a complete checkout of armagetronad/branches/0.3.0 and armagetronad/trunk did work the last time I checked, although for 0.3.0, I had to kick Joda a bit to make it work :) Yes, the code::blocks bits in winlibs should by now be merged back into the trunk, but I haven't checked whether they actually work there.
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

It's been taken care of in IRC. Thanks again, joda!
Post Reply