Compiling Spasm from SVN

Need help with programming? Feel free to ask anything. Answers are welcome as well!
  • Author
  • Message
Offline
User avatar

add

Topic Starter

Compiling Spasm from SVN

Post19 January 2014, 19:21

Hello, I'd like to start learning z80 (TI84+ more specifically) programming (again..), and I've downloaded the Spasm code from the link to svn on wabbit.
But to no avail, I got this error message:
Code: Select all
$ make
g++ -I.  -DUSE_REUSABLES -DUSE_GMP -DUNIXVER -DUSE_BUILTIN_FCREATE -c main.cpp
In file included from storage.h:5:0,
                 from main.cpp:7:
hash.h:29:31: error: expected template-name before ‘<’ token
hash.h:29:31: error: expected ‘{’ before ‘<’ token
hash.h:29:31: error: expected unqualified-id before ‘<’ token                          
make: *** [main.o] Error 1
 
Offline
User avatar

chickendude

Staff Member

Re: Compiling Spasm from SVN

Post19 January 2014, 19:36

You'll need to add #include <functional> and #include <unordered_map> at the top (under #include "list.h").
You'll also need to add the flag:
-std=c++11
..to g++ in the makefile:
CXXFLAGS+= -I. -DUSE_REUSABLES -DUSE_GMP -DUNIXVER -DUSE_BUILTIN_FCREATE -std=c++11

There might be a couple other issues as well, i think there are a couple #if statements you'll need to modify. Try downloading the modified source that Contra put together and seeing if that works:
http://www.mirari.fr/wo0H
Offline
User avatar

add

Topic Starter

Re: Compiling Spasm from SVN

Post19 January 2014, 21:47

Works well! Thanks.

EDIT: I actually tried "make clean" and then "make" and then it errors again, woot..

EDIT2: I changed -std=c++11 to -std=c++0x and it compiled..
Offline
User avatar

chickendude

Staff Member

Re: Compiling Spasm from SVN

Post20 January 2014, 02:00

Ah, cool, i guess you have an older version of g++. Glad to hear it worked, though! Have you tried assembling anything, yet?
Offline
User avatar

add

Topic Starter

Re: Compiling Spasm from SVN

Post20 January 2014, 10:14

No, I should get some example programs for a starter I guess.
And yeah my gcc is an older version, the standard version that comes with ubuntu 12.04 :-/

Return to Programming Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron