English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 June 2017, 22:22   #1
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,629
Viceplus build error

i try to build VicePlus - crosscompile on cygwin32 bit
Code:
CC=m68k-amigaos-gcc.exe ./configure --host=m68k-amigaos --with-picasso96 --without-resid
i get an error i cannot fix:
Code:
mousedrv.c: In function `rem_inputhandler':
mousedrv.c:150: sizeof applied to an incomplete type
mousedrv.c: In function `add_inputhandler':
mousedrv.c:163: sizeof applied to an incomplete type
mousedrv.c:166: dereferencing pointer to incomplete type
mousedrv.c:167: dereferencing pointer to incomplete type
mousedrv.c:168: dereferencing pointer to incomplete type
mousedrv.c:169: dereferencing pointer to incomplete type
make[5]: *** [Makefile:771: mousedrv.o] Error 1
the lines in question from mousedrv.c
Code:
   128  static struct IOStdReq *inputReqBlk = NULL;
   129  static struct MsgPort *inputPort = NULL;
   130  static struct Interrupt *inputHandler = NULL;
   131  static const UBYTE HandlerName[] = __FILE__ " input handler";
   132  static int input_error = -1;
   133
   134  void rem_inputhandler(void)
   135  {
   136    if (!input_error) {
   137      inputReqBlk->io_Data=(APTR)inputHandler;
   138      inputReqBlk->io_Command=IND_REMHANDLER;
   139      DoIO((struct IORequest *)inputReqBlk);
   140      CloseDevice((struct IORequest *)inputReqBlk);
   141      input_error = -1;
   142    }
   143
   144    if (inputReqBlk) {
   145      DeleteIORequest((struct IORequest *)inputReqBlk);
   146      inputReqBlk = NULL;
   147    }
   148
   149    if (inputHandler) {
   150      lib_FreeMem(inputHandler, sizeof(struct Interrupt));
   151      inputHandler = NULL;
   152    }
   153
   154    if (inputPort) {
   155      DeleteMsgPort(inputPort);
   156      inputPort = NULL;
   157    }
   158  }
   159
   160  int add_inputhandler(void)
   161  {
   162    if ((inputPort = CreateMsgPort())) {
   163      if ((inputHandler = (struct Interrupt *)lib_AllocMem(sizeof(struct Interrupt), MEMF_PUBLIC|MEMF_CLEAR))) {
   164        if ((inputReqBlk = (struct IOStdReq *)CreateIORequest(inputPort, sizeof(struct IOStdReq)))) {
   165          if (!(input_error = OpenDevice("input.device", 0, (struct IORequest *)inputReqBlk, 0))) {
   166            inputHandler->is_Code         = (void *)MyInputHandler;
   167            inputHandler->is_Data         = NULL;
   168            inputHandler->is_Node.ln_Pri  = 100;
   169            inputHandler->is_Node.ln_Name = (STRPTR)HandlerName;
   170            inputReqBlk->io_Data    = (APTR)inputHandler;
   171            inputReqBlk->io_Command = IND_ADDHANDLER;
   172            DoIO((struct IORequest *)inputReqBlk);
   173          }
here the content of mousedrv.h
Code:
#ifndef _MOUSEDRV_H
#define _MOUSEDRV_H

#include "types.h"

extern int mousedrv_resources_init(void);
extern int mousedrv_cmdline_options_init(void);
extern void mousedrv_init(void);
extern void rem_inputhandler(void);

extern void mousedrv_mouse_changed(void);

extern BYTE mousedrv_get_x(void);
extern BYTE mousedrv_get_y(void);

extern void mousedrv_sync(void);

#endif
does it need different definition or something?
does anyone know how to fix this?

Last edited by emufan; 25 June 2017 at 22:30.
emufan is offline  
AdSense AdSense  
Old 26 June 2017, 18:52   #2
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 359
Well, it complains for what is passed to the sizeof in two lines.
The type is struct Interrupt, so #include <exec/interrupts>, that will fix all the dereferencing on struct Interrupt * too

Hope it works.
alkis is offline  
Old 26 June 2017, 19:04   #3
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,629
oh, cool. it does work
actually it is: #include <exec/interrupts.h>added in mousedrv.c

thanks
emufan is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WHDLoad error: error during 'resload_LoadKick' on monkey island & others jamespstevenson project.MAGE 14 20 February 2014 05:33
ERROR: Metal Masters (Illegal Instruction / Address Error / Black Screen) killergorilla project.Killergorilla's WHD packs 7 25 March 2012 15:32
ERROR: Leisure Suit Larry Enhanced (Address Error) batwinky project.Killergorilla's WHD packs 23 30 January 2011 13:00
(ERROR) Shadow Warriors - DOS Error #219 Retro-Nerd project.Killergorilla's WHD packs 5 04 January 2009 16:26
ERROR: Arena (Psygnosis) (resload_control error) killergorilla project.Killergorilla's WHD packs 5 25 September 2007 17:39

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:51.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.22273 seconds with 12 queries