Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey! I'm  trying to build decker on linux and I'm getting an error. Mind you that I have close to 0 coding knowledge and its a miracle I'm able to even use linux so the problem  might be obvious.


$ make

In file included from ./c/decker.c:3:

./c/dom.h: In function ‘deck_write’:

./c/dom.h:2882:37: error: ‘js_decker_html’ undeclared (first use in this function)

 2882 |                 str_addz(&r,lmiutf8(js_decker_html,js_decker_html_len));

      |                                     ^~~~~~~~~~~~~~

./c/dom.h:2882:37: note: each undeclared identifier is reported only once for each function it appears in

./c/dom.h:2882:52: error: ‘js_decker_html_len’ undeclared (first use in this function)

 2882 |                 str_addz(&r,lmiutf8(js_decker_html,js_decker_html_len));

      |                                                    ^~~~~~~~~~~~~~~~~~

./c/dom.h:2891:37: error: ‘js_lil_js’ undeclared (first use in this function)

 2891 |                 str_addz(&r,lmiutf8(js_lil_js,js_lil_js_len));

      |                                     ^~~~~~~~~

./c/dom.h:2891:47: error: ‘js_lil_js_len’ undeclared (first use in this function)

 2891 |                 str_addz(&r,lmiutf8(js_lil_js,js_lil_js_len));

      |                                               ^~~~~~~~~~~~~

./c/dom.h:2892:37: error: ‘js_danger_js’ undeclared (first use in this function)

 2892 |                 str_addz(&r,lmiutf8(js_danger_js,js_danger_js_len));

      |                                     ^~~~~~~~~~~~

./c/dom.h:2892:50: error: ‘js_danger_js_len’ undeclared (first use in this function)

 2892 |                 str_addz(&r,lmiutf8(js_danger_js,js_danger_js_len));

      |                                                  ^~~~~~~~~~~~~~~~

./c/dom.h:2893:37: error: ‘js_decker_js’ undeclared (first use in this function)

 2893 |                 str_addz(&r,lmiutf8(js_decker_js,js_decker_js_len));

      |                                     ^~~~~~~~~~~~

./c/dom.h:2893:50: error: ‘js_decker_js_len’ undeclared (first use in this function)

 2893 |                 str_addz(&r,lmiutf8(js_decker_js,js_decker_js_len));

      |                                                  ^~~~~~~~~~~~~~~~

In file included from ./c/decker.c:9:

./c/io_sdl2.h: In function ‘base_path’:

./c/io_sdl2.h:75:87: warning: zero-length gnu_printf format string [-Wformat-zero-length]

   75 |         if(t){snprintf(path,PATH_MAX,"%s",t);SDL_free(t);}else{snprintf(path,PATH_MAX,"");}

      |                                                                                       ^~

./c/decker.c: In function ‘main’:

./c/decker.c:4314:57: error: ‘examples_decks_tour_deck’ undeclared (first use in this function)

 4314 |         if(!deck){str doc=str_new();str_add(&doc,(char*)examples_decks_tour_deck,examples_decks_tour_deck_len);load_deck(deck_get(lmstr(doc)));}

      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~

./c/decker.c:4314:82: error: ‘examples_decks_tour_deck_len’ undeclared (first use in this function)

 4314 |        if(!deck){str doc=str_new();str_add(&doc,(char*)examples_decks_tour_deck,examples_decks_tour_deck_len);load_deck(deck_get(lmstr(doc)));}

      |                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

make: *** [Makefile:66: c/build/decker] Error 1

(+1)

The js_decker_html variable should be defined in c/resources.h which should be automatically built when it needs to be.

If you rm c/resources.h and then make V=1 c/resources.h do you get any error message?

(1 edit) (+2)

Doing that solved the issue! Thanks!:-) You're getting a special thanks in my first decker project lol