include/console.inc(33) : error 025: function heading differs from prototype

183 views
Skip to first unread message

Florian Schüller

unread,
Oct 14, 2014, 4:14:10 AM10/14/14
to pawns...@googlegroups.com
Hi!

I just wanted to try Pawn Script and the examples somehow don't work.
I have an embedded linux currently without cmake so I just wrote a simple makefile with the paramters I found in CMakeLists.txt (output attached)

pawncc and pawnrun compile but when I try to compile "examples/hello.p" I get:
----
# ./pawncc examples/hello.p
Pawn compiler 4.0.4733 Copyright (c) 1997-2012, ITB CompuPhase

/home/developer/pawn/include/console.inc(33) : error 025: function heading differs from prototype

1 Error.
----

when I just comment out the "forward @keypressed(key);" in "include/console.inc" (which I don't need for "hello" obviously)
then hello.p seems to work
---- 
# ./pawncc examples/hello.p
Pawn compiler 4.0.4733 Copyright (c) 1997-2012, ITB CompuPhase

# ./pawnrun hello.amx
Hello world

Run time: 0.00 seconds
----


but faculty.p fails with the same problem:
----
# ./pawncc examples/faculty.p
Pawn compiler 4.0.4733 Copyright (c) 1997-2012, ITB CompuPhase

examples/faculty.p(11) : error 025: function heading differs from prototype

1 Error.
----

I tried changing "optimization level", verbosity and other options without success

Can someone help?
Regards
Flo

1_compile.log
LST_and_ASM.7z

Florian Schüller

unread,
Oct 14, 2014, 6:13:07 AM10/14/14
to pawns...@googlegroups.com
Sorry for the spam - I debugged myself and the problem is only in the "Current version    4.0.4733 (2012-06-22)" from http://www.compuphase.com/pawn/pawn.htm

...and fixed in SVN in Revision 41:
31.08.2012 14:42:46
Removed -H compiler option (left-over of 16-bit Windows support).
---> BUG fix: when declaring a public function with arguments, the declaration could (incorrectly) trigger error 25 (definition differs from prototype).
Changes for reduced warnings, especially when compiling in 64-bit.

So I'll be using SVN version then....
Reply all
Reply to author
Forward
0 new messages