Console version

Started by guest7581, April 17, 2020, 19:22:45

Previous topic - Next topic

guest7581

I know that SmallBASIC is mainly for graphics, but, since it is possible to build a console version of the interpreter, why it is never pre-build and included? I've tried to build the newest version on Solus, but it failed. The graphics version of 0.12.17 from .deb file works without problems, but to successfully compile console version I had to go back to 0.12.6.

chrisws

The console version should build okay, could you please provide the error output?

guest7581

OK. I tried once again and this time there was no problem.  :) Before, there was something wrong with lodepng.o. However, I couldn't build the newest SDL version.


runtime.cpp: In member function 'virtual char* Runtime::loadResource(const char*)':
runtime.cpp:353:29: error: 'main_bas_len' was not declared in this scope
  353 |     buffer = (char *)malloc(main_bas_len + 1);
      |                             ^~~~~~~~~~~~
runtime.cpp:354:20: error: 'main_bas' was not declared in this scope
  354 |     memcpy(buffer, main_bas, main_bas_len);
      |                    ^~~~~~~~
In file included from ../../../src/platform/sdl/runtime.h:15,
                 from runtime.cpp:21:
runtime.cpp: In member function 'bool System::getPen3()':
/usr/include/SDL2/SDL_mouse.h:281:32: warning: '<<' in boolean context, did you mean '<' ? [-Wint-in-bool-context]
  281 | #define SDL_BUTTON(X)       (1 << ((X)-1))
      |                             ~~~^~~~~~~~~~~
runtime.cpp:813:11: note: in expansion of macro 'SDL_BUTTON'
  813 |   return (SDL_BUTTON(SDL_BUTTON_LEFT) && SDL_GetMouseState(&_touchCurX, &_touchCurY));
      |           ^~~~~~~~~~
make[2]: *** [Makefile:539: runtime.o] Error 1
make[2]: Leaving directory '/home/tom/Downloads/SmallBASIC/src/platform/sdl'
make[1]: *** [Makefile:398: all-recursive] Error 1
make[1]: Leaving directory '/home/tom/Downloads/SmallBASIC'
make: *** [Makefile:339: all] Error 2

bplus

Off topic but I must say Hello to Tomaaz, Hello!
1 person likes this

guest7581

Quote from: bplus on April 18, 2020, 15:42:33
Off topic but I must say Hello to Tomaaz, Hello!

Hi! :)

Since the last problem has had nothing to do with the console version of SmallBASIC I'm gonna create a new topic to keep things organised.