Page 1 of 1

battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 5:26 am
by samo79
I'm trying to compile a software from 68k to OS4 but it seems we miss battmem.h from the official SDK.
This is the output i get:
Processo: Shell 6
6.AmigaOS4:> Work:SDK/Progetti/report_source/
6.Work:SDK/Progetti/report_source> make -f makefile.os4
ppc-amigaos-gcc -O0 -mno-sdata -fomit-frame-pointer -fno-builtin -fstrength-reduce -c -g -mmultiple -Wall -W -Wundef -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Werror -D__USE_INLINE__ -D__USE_BASETYPE__ rp.c
ppc-amigaos-gcc -O0 -mno-sdata -fomit-frame-pointer -fno-builtin -fstrength-reduce -c -g -mmultiple -Wall -W -Wundef -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Werror -D__USE_INLINE__ -D__USE_BASETYPE__ f1.c
ppc-amigaos-gcc -O0 -mno-sdata -fomit-frame-pointer -fno-builtin -fstrength-reduce -c -g -mmultiple -Wall -W -Wundef -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Werror -D__USE_INLINE__ -D__USE_BASETYPE__ f2.c
ppc-amigaos-gcc -O0 -mno-sdata -fomit-frame-pointer -fno-builtin -fstrength-reduce -c -g -mmultiple -Wall -W -Wundef -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Werror -D__USE_INLINE__ -D__USE_BASETYPE__ f3.c
In file included from f3.c:16:
/SDK/include/include_h/proto/battmem.h:28:31: error: inline4/battmem.h: No such file or directory
cc1: warnings being treated as errors
f3.c: In function 'drawbit':
f3.c:413: warning: comparison of unsigned expression >= 0 is always true
f3.c: In function 'readbatt':
f3.c:437: warning: implicit declaration of function 'ObtainBattSemaphore'
f3.c:439: warning: implicit declaration of function 'ReadBattMem'
f3.c:440: warning: implicit declaration of function 'ReleaseBattSemaphore'
f3.c: In function 'batt_loop':
f3.c:473: warning: comparison of unsigned expression < 0 is always false
f3.c: In function 'writebatt':
f3.c:578: warning: implicit declaration of function 'WriteBattMem'
make: *** [f3.o] Error 1
So for the next SDK is it possible to include the missing battmem.h file or adjust proto/battmem.h to not include files that doesn't exist ?
Or maybe are there any other solution ?

Thanks in advance !

Re: battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 7:55 am
by Slayer
I'm no coding genuis but it looks like its been moved?

DH0:SDK/Include/include_h/proto/battmem.h

Since it includes DH0:SDK/Include/include_h/resources/battmem.h that has the declarations you require... perhaps its change in location is mentioned in the documentation with any other instructions...

also, because you have -D__USE_INLINE DH0:SDK/Include/include_h/proto/battmem.h includes the missing <inline4/battmem.h>

If all else fails try removing that? perhaps this isn't necessary anymore like its always turned on... of course I'm only guessing :D

sorry if its a shot in the dark ;)

actually now that I re-read your message perhaps you sorted it anyway? but just wanted to mention that it should be rectified, here I was thinking it was a plea for help :mrgreen:

Re: battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 3:21 pm
by broadblues
I checked the SDK and the file is clearly missing.

Reported as bug #7097

Re: battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 5:25 pm
by samo79
@Andy

Thanks for reporting ;-)
In your opinion there is a way to release this file standalone ? I need it as soon as possible to compile the project :roll:

No problem at all If not, i can wait ;)

Re: battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 10:18 pm
by broadblues
In your opinion there is a way to release this file standalone ? I need it as soon as possible to compile the project

No problem at all If not, i can wait

Not something I can do anything about, I'm only a betatester.

But you can generate it from the .xml file.

idltool -n sdk:Include/interfaces/battmem.xml

I've no idea to what extent the resource is supported or functional under OS4 though.

Re: battmem.h missing on latest SDK ?

Posted: Sun Jun 26, 2011 11:09 pm
by samo79
@Andy

For the moment I received the file from the author of the program i need to port, still some problems but maybe it's only my inexperience with SDK things :-)
Will see if we can solve, if not i'll try to generate it as you suggest, thanks for the tip and for bug report !