Ooops
November 28, 2020, 02:27:36 AM

Author Topic: Console version  (Read 505 times)

guest7581

  • Guest
Console version
« on: April 17, 2020, 07:22:45 PM »
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.

Offline chrisws

  • Jr. Member
  • **
  • Posts: 61
    • SmallBASIC
Re: Console version
« Reply #1 on: April 18, 2020, 02:48:47 AM »
The console version should build okay, could you please provide the error output?

guest7581

  • Guest
Re: Console version
« Reply #2 on: April 18, 2020, 11:35:18 AM »
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.

Code: [Select]
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

Offline bplus

  • Full Member
  • ***
  • Posts: 147
Re: Console version
« Reply #3 on: April 18, 2020, 03:42:33 PM »
Off topic but I must say Hello to Tomaaz, Hello!

guest7581

  • Guest
Re: Console version
« Reply #4 on: April 18, 2020, 03:49:59 PM »
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.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal