I'm currently trying to compile SPASM on Ubuntu ARM but I'm having trouble with it. I've seen several posts saying this was good, and so I wanted to try it.

I found the source code here but when I tried to make it I got this as output:


Code:
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


How do you build SPASM?
Does anyone here know?
It's not really an answer to your question, but I'd strongly recommend Mono + Brass over SPASM. To actually answer your question, the line in question is:
Code:
: public std::unary_function<const char *, size_t>
. According to this topic:
Quote:
Don't forget to #include <functional> to get unary_function and then qualify it with std::unary_function.
KermMartian wrote:
It's not really an answer to your question, but I'd strongly recommend Mono + Brass over SPASM. To actually answer your question, the line in question is:
Code:
: public std::unary_function<const char *, size_t>
. According to this topic:
Quote:
Don't forget to #include <functional> to get unary_function and then qualify it with std::unary_function.


Well, I'm sort of looking for something with a bit less dependencies.
And I edited the "hash.h" and added "#include <functional>" to the top, and then it started giving me another error:


Code:
In file included from storage.h:7:0,
                 from main.cpp:7:
hash.h:48:10: error: ‘unordered_map’ in namespace ‘std’ does not name a type
hash.h:49:3: error: ‘maptype’ does not name a type
main.cpp:210:14: error: expected initializer before ‘WinMain’
make: *** [main.o] Error 1


I tried adding "#include <unordered_map>" to the top, but that didn't fix it.

I'll probably just use Brass for now. But I would still like it if someone could figure out why the source won't compile for me.
First result on google for your error points out that you are using C++11 code and must invoke g++ with -std=c++11 (or -std=c++0x if you are running an outdated g++, else you need to update). Try googling for your errors and discover solutions to known problems.
AHelper wrote:
First result on google for your error points out that you are using C++11 code and must invoke g++ with -std=c++11 (or -std=c++0x if you are running an outdated g++, else you need to update). Try googling for your errors and discover solutions to known problems.


I've tried that already. It didn't work.
What is your error? Do you have an up-to-date GCC supporting C++11?
I've made these changes (added those two includes and added -std=c++11 to the g++ flags) and now i'm getting this error:

Code:
main.cpp:210:14: error: expected initializer before ‘WinMain’
 int CALLBACK WinMain(HINSTANCE hInst, HINSTANCE  hPrev, LPSTR lpCommandLine, int nCmdShow)
              ^
make: *** [main.o] Error 1
Any ideas?
That's Win32-specific stuff. Either you're compiling the Win32 version by mistake, or the flags that tell SPASM that you're on Windows vs. *nix aren't being properly set.
Well that's no good :/

I found an article on contra's site about compiling spasm:
http://ti-84-plus.com/blog/spasm-on-linux-64bits-how-to-install-and-fix-common-issues/

The modified file compiled/seemed to work, but it isn't recognizing any of my labels, so something must still be up...

EDIT: it seems to mostly be with .db/.dw statements, but the values in the .lst file are all correct. Weird...
EDIT2: actually, it does seem to assemble it, just it throws a lot of errors afterwards.

Code:
Pass one...
Pass two...
Done
main.asm:33: error SE106: Could not find label or macro 'description'
main.asm:35: error SE106: Could not find label or macro 'icon'
[...] (another 50 or so errors)
I doubt it would be much fun, but since you compiled from source, you could try to track down what's causing that and see if you can generate a patch to fix it. Smile How's your C++?
Not that great, but i can try to crawl my way around and see if i can find something. Razz

EDIT: Ok, i found out that it's the ReplaySPASMErrorSession call in main.cpp. The function (method? whatever it's called) is in errors.cpp. I tried just commenting it out, and that worked, but then i can't see legitimate errors, either.

EDIT2: Alright, i think i've got it working! If anyone else is interested, here's the source i ended up with:
http://www.mirari.fr/wo0H
Chickendude, would it be possible to diff your changes against the original to generate the patch? I would imagine that would be something the SPASM creators (and users) would be very happy to have.
Sure, though i think it's just a hack for linux (it might not work on Windows now). I'll talk to someone who actually knows something to see if it'd be worthwhile passing on to BuckeyeDude.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement