InstallerLG
InstallerLG copied to clipboard
vbcc compiles but execution fails
This compiler seems to be more restrictive:
vc +aos68k -c99 -Ivbcc:PosixLib/include -c -o eval.o eval.c
> if(gui_init(status))
error 39 in line 479 of "eval.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "eval.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include -O=1 -Ivincludeos3: failed
make: *** [eval.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include -c -o external.o external.c
> inp_t grc = gui_confirm(str(prompt), str(help), back);
error 39 in line 88 of "external.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "external.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include -O=1 -Ivincludeos3: failed
make: *** [external.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include -c -o file.o file.c
> grc = gui_confirm(get_buf(), hlp, back);
error 39 in line 138 of "file.c": invalid types for assignment
> );
error 39 in line 1464 of "file.c": invalid types for assignment
> cur->copy, back, mode);
error 39 in line 1494 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1797 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1816 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, back, mode);
error 39 in line 1823 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1950 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, back, m
error 39 in line 1959 of "file.c": invalid types for assignment
> grc = h_copyfile(contxt, src, name, bac
error 39 in line 1981 of "file.c": invalid types for assignment
9 errors found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "file.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include -O=1 -Ivincludeos3: failed
make: *** [file.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include -c -o information.o information.c
> inp_t grc = gui_message(msg, back);
error 39 in line 196 of "information.c": invalid types for assignment
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "information.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include -O=1 -Ivincludeos3: failed
make: *** [information.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include -c -o prompt.o prompt.c
> inp_t grc = gui_bool(prt, hlp, yes, nay, back);
error 39 in line 82 of "prompt.c": invalid types for assignment
> inp_t grc = gui_choice(prt, hlp, chs, ndx - del, back, &DNU
error 39 in line 281 of "prompt.c": invalid types for assignment
> def, back, &ret);
error 39 in line 373 of "prompt.c": invalid types for assignment
> def, back, &ret);
error 39 in line 647 of "prompt.c": invalid types for assignment
> inp_t grc = gui_number(prt, hlp, min, max, def, back, &DNUM
error 39 in line 768 of "prompt.c": invalid types for assignment
> inp_t grc = gui_options(prt, hlp, chs, ndx, back, &DNUM);
error 39 in line 929 of "prompt.c": invalid types for assignment
> inp_t grc = gui_string(prt, hlp, def, back, &res);
error 39 in line 1009 of "prompt.c": invalid types for assignment
7 errors found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "prompt.c" -o= "T:t_7_0.asm" -c99 -Ivbcc:PosixLib/include -O=1 -Ivincludeos3: failed
make: *** [prompt.o] Error 20
make: Target `Installer' not remade because of errors.
error 39:
In an assignment-context (this includes passing arguments to prototyped functions) the source and target must be one of the following types:
- both are arithmetic types
- both are the same struct/union
- one of them is a pointer to void and the other one is any pointer
- the target is any pointer and the source is an integral
constant-expression with the value 0
- both are pointer to the same type (here the target may have
additional const/volatile qualifiers - not recursively, however)
Any other combinations should be illegal.
Is this a problem with the bool:s?
What happens if you cast 'back' to bool?
e.g: h_copyfile(contxt, src, name, (bool) back, ....)
I get warning 106 in line 1797 of "file.c": pointer too large to fit into integer
, should we ignore it?
Yes, we can ignore that since we're not using 'back' as a pointer in h_copyfile, it's just a "is this NULL?" test.
You could also replace 'back' with 'back ? true : false', that should get rid of the warning (and hopefully not generate another one ;) )
This is left
vc +aos68k -c99 -Ivbcc:PosixLib/include -I. -I../build -O -DAMIGA -c -o args.o args.c
> )
error 76 in line 52 of "args.c": identifier expected
aborting...
unexpected end of file
1 error found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "args.c" -o= "T:t_8_0.asm" -c99 -Ivbcc:PosixLib/include -I. -I../build -DAMIGA -O=991 -Ivincludeos3: failed
make: *** [args.o] Error 20
vc +aos68k -c99 -Ivbcc:PosixLib/include -I. -I../build -O -DAMIGA -c -o gui.o gui.c
> struct MUI_InputHandlerNode Ticker;
error 14 in line 99 of "gui.c": incomplete type (Ticker) in struct
> struct MUI_InputHandlerNode Ticker;
warning 55 in line 99 of "gui.c": struct/union has no members
> struct MUI_InputHandlerNode Ticker;
warning 56 in line 99 of "gui.c": } expected
> struct Window *Win;
warning 68 in line 103 of "gui.c": redeclaration of var <Win> with new type
> *Number, *Empty, *Text,
warning 68 in line 108 of "gui.c": redeclaration of var <Text> with new type
>}
error 0 in line 114 of "gui.c": declaration expected
aborting...
2 errors found!
vbccm68k fehlgeschlagen Rückgabewert 20
vbccm68k -quiet -hunkdebug "gui.c" -o= "T:t_8_0.asm" -c99 -Ivbcc:PosixLib/include -I. -I../build -DAMIGA -O=991 -Ivincludeos3: failed
make: *** [gui.o] Error 20
make: Target `Installer' not remade because of errors.
Can you dump the preprocessor output? Looking at the VBCC docs, '-E' seems to the way to do it.
Ok, at least it's MUI related, vbcc without AMIGA macro already works.
Very good, that should be solvable. I was a bit nervous about the parser part.
Plenty of macros in that part so '-E' is probably your friend.
Some progress https://github.com/sodero/InstallerLG/commit/b9139c6c3bc18f8a00eb1a94408fc66d446ea733#diff-9633fbb1df294cc3f46a261522dd9c75e20c518ce48fe08a3566d5f8ce612d5b