tiny-js icon indicating copy to clipboard operation
tiny-js copied to clipboard

build error Script.cpp:50:5: CTinyJS was not declared in this scope

Open sallecta opened this issue 6 years ago • 1 comments

commit db198df2d3945e785438aaae6747daedcd7c654f

Error details (console output) make g++ -c -g -Wall -rdynamic -D_DEBUG run_tests.cpp -o run_tests.o g++ -c -g -Wall -rdynamic -D_DEBUG TinyJS.cpp -o TinyJS.o g++ -c -g -Wall -rdynamic -D_DEBUG TinyJS_Functions.cpp -o TinyJS_Functions.o g++ -c -g -Wall -rdynamic -D_DEBUG TinyJS_MathFunctions.cpp -o TinyJS_MathFunctions.o g++ -g -rdynamic run_tests.o TinyJS.o TinyJS_Functions.o TinyJS_MathFunctions.o -o run_tests g++ -c -g -Wall -rdynamic -D_DEBUG Script.cpp -o Script.o Script.cpp: In function ‘void js_dump(TinyJS::Variable*, void*)’: Script.cpp:50:5: error: ‘CTinyJS’ was not declared in this scope CTinyJS *js = (CTinyJS*)userdata; ^~~~~~~ Script.cpp:50:14: error: ‘js’ was not declared in this scope CTinyJS *js = (CTinyJS*)userdata; ^~ Script.cpp:50:28: error: expected primary-expression before ‘)’ token CTinyJS *js = (CTinyJS*)userdata; ^ Makefile:21: recipe for target 'Script.o' failed make: *** [Script.o] Error 1

Solution replace in file Script.cpp line 50 CTinyJS *js = (CTinyJS*)userdata; with TinyJS::Interpreter *js = (TinyJS::Interpreter*)userdata;

sallecta avatar Aug 09 '19 01:08 sallecta

I have made a diff file that fixes this. Use patch not patch -p1. TinyJSPatch.txt

ghost avatar Jan 22 '21 18:01 ghost