foralex / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

can't build picoc use BUILTIN_MINI_STDLIB macor #167

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. if use BUILTIN_MINI_STDLIB , can't build it;

What is the expected output? What do you see instead?
A:build error.

What version of the product are you using? On what operating system?
A: svn 2012.09.25

Please provide any additional information below.

Original issue reported on code.google.com by zf8...@gmail.com on 25 Sep 2012 at 8:06

GoogleCodeExporter commented 8 years ago
I'm getting the same issue here. Here's what happens on Slackware 14.0, using 
4.7.1.

What did you do... :P
(Note, "CStdOutBase" is declared in interpreter.h, which is correctly included 
from clibrary.c. *majorly confuzled*)

bash-4.2$ make
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o picoc.o picoc.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o table.o table.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o lex.o lex.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o parse.o parse.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o expression.o expression.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o heap.o heap.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o type.o type.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o variable.o variable.c
gcc -Wall -pedantic -g -DUNIX_HOST -DVER=\"`svnversion -n`\" 
-DBUILTIN_MINI_STDLIB   -c -o clibrary.o clibrary.c
clibrary.c: In function 'BasicIOInit':
clibrary.c:98:20: error: 'CStdOutBase' undeclared (first use in this function)
clibrary.c:98:20: note: each undeclared identifier is reported only once for 
each function it appears in
clibrary.c: In function 'CLibraryInit':
clibrary.c:105:50: error: 'IntType' undeclared (first use in this function)
clibrary.c: In function 'PrintUnsigned':
clibrary.c:160:9: warning: passing argument 1 of 'PrintRepeatedChar' makes 
pointer from integer without a cast [enabled by default]
clibrary.c:131:6: note: expected 'struct Picoc *' but argument is of type 'int'
clibrary.c:160:9: warning: passing argument 3 of 'PrintRepeatedChar' makes 
integer from pointer without a cast [enabled by default]
clibrary.c:131:6: note: expected 'int' but argument is of type 'struct 
OutputStream *'
clibrary.c:160:9: error: too few arguments to function 'PrintRepeatedChar'
clibrary.c:131:6: note: declared here
clibrary.c:165:9: warning: passing argument 1 of 'PrintRepeatedChar' makes 
pointer from integer without a cast [enabled by default]
clibrary.c:131:6: note: expected 'struct Picoc *' but argument is of type 'int'
clibrary.c:165:9: warning: passing argument 3 of 'PrintRepeatedChar' makes 
integer from pointer without a cast [enabled by default]
clibrary.c:131:6: note: expected 'int' but argument is of type 'struct 
OutputStream *'
clibrary.c:165:9: error: too few arguments to function 'PrintRepeatedChar'
clibrary.c:131:6: note: declared here
clibrary.c: In function 'GenericPrintf':
clibrary.c:265:40: error: 'CharPtrType' undeclared (first use in this function)
clibrary.c:266:81: error: 'IntType' undeclared (first use in this function)
clibrary.c:268:41: error: 'FPType' undeclared (first use in this function)
clibrary.c: In function 'LibExit':
clibrary.c:369:5: warning: passing argument 1 of 'PlatformExit' makes pointer 
from integer without a cast [enabled by default]
In file included from picoc.h:19:0,
                 from clibrary.c:4:
interpreter.h:600:6: note: expected 'struct Picoc *' but argument is of type 
'int'
clibrary.c:369:5: error: too few arguments to function 'PlatformExit'
In file included from picoc.h:19:0,
                 from clibrary.c:4:
interpreter.h:600:6: note: declared here
make: *** [clibrary.o] Error 1
bash-4.2$

Original comment by asm...@gmail.com on 12 Aug 2013 at 12:34

GoogleCodeExporter commented 8 years ago
Attached a patch (picoc-mini-stdlib-r608.patch) against subversion revision 608 
that makes picoc compile with the BUILTIN_MINI_STDLIB define.

Original comment by dkarel...@gmail.com on 13 Apr 2014 at 2:41

Attachments: