Compile Error with var type.

SGDK only sub forum

Moderator: Stef

Post Reply
orlanrod
Very interested
Posts: 99
Joined: Fri Sep 25, 2015 7:46 pm

Compile Error with var type.

Post by orlanrod » Mon Jun 17, 2019 3:04 am

Hey yall.

I seem to have an issue compiling, giving this error.

Code: Select all

In file included from main.c:5:0:
C:/SGDK/inc/joy.h:123:32: error: unknown type name 'u16'
 typedef void _joyEventCallback(u16 joy, u16 changed, u16 state);
                                ^~~
C:/SGDK/inc/joy.h:123:41: error: unknown type name 'u16'
 typedef void _joyEventCallback(u16 joy, u16 changed, u16 state);
                                         ^~~
C:/SGDK/inc/joy.h:123:54: error: unknown type name 'u16'
 typedef void _joyEventCallback(u16 joy, u16 changed, u16 state);
                                                      ^~~
C:/SGDK/inc/joy.h:152:26: error: unknown type name '_joyEventCallback'
 void JOY_setEventHandler(_joyEventCallback *CB);
                          ^~~~~~~~~~~~~~~~~
C:/SGDK/inc/joy.h:184:21: error: unknown type name 'u16'
 void JOY_setSupport(u16 port, u16 support);
                     ^~~
C:/SGDK/inc/joy.h:184:31: error: unknown type name 'u16'
 void JOY_setSupport(u16 port, u16 support);
                               ^~~
C:/SGDK/inc/joy.h:212:1: error: unknown type name 'u8'
 u8 JOY_getPortType(u16 port);
 ^~
C:/SGDK/inc/joy.h:212:20: error: unknown type name 'u16'
 u8 JOY_getPortType(u16 port);
                    ^~~
C:/SGDK/inc/joy.h:235:1: error: unknown type name 'u8'
 u8 JOY_getJoypadType(u16 joy);
 ^~
C:/SGDK/inc/joy.h:235:22: error: unknown type name 'u16'
 u8 JOY_getJoypadType(u16 joy);
                      ^~~
C:/SGDK/inc/joy.h:270:1: error: unknown type name 'u16'
 u16  JOY_readJoypad(u16 joy);
 ^~~
C:/SGDK/inc/joy.h:270:21: error: unknown type name 'u16'
 u16  JOY_readJoypad(u16 joy);
                     ^~~
C:/SGDK/inc/joy.h:294:1: error: unknown type name 's16'
 s16  JOY_readJoypadX(u16 joy);
 ^~~
C:/SGDK/inc/joy.h:294:22: error: unknown type name 'u16'
 s16  JOY_readJoypadX(u16 joy);
                      ^~~
C:/SGDK/inc/joy.h:318:1: error: unknown type name 's16'
 s16  JOY_readJoypadY(u16 joy);
 ^~~
C:/SGDK/inc/joy.h:318:22: error: unknown type name 'u16'
 s16  JOY_readJoypadY(u16 joy);
                      ^~~
C:/SGDK/inc/joy.h:329:1: error: unknown type name 'u16'
 u16 JOY_waitPressBtnTime(u16 ms);
 ^~~
C:/SGDK/inc/joy.h:329:26: error: unknown type name 'u16'
 u16 JOY_waitPressBtnTime(u16 ms);
                          ^~~
C:/SGDK/inc/joy.h:364:1: error: unknown type name 'u16'
 u16 JOY_waitPress(u16 joy, u16 btn);
 ^~~
C:/SGDK/inc/joy.h:364:19: error: unknown type name 'u16'
 u16 JOY_waitPress(u16 joy, u16 btn);
                   ^~~
C:/SGDK/inc/joy.h:364:28: error: unknown type name 'u16'
 u16 JOY_waitPress(u16 joy, u16 btn);
                            ^~~
C:/SGDK/inc/joy.h:402:1: error: unknown type name 'u16'
 u16 JOY_waitPressTime(u16 joy, u16 btn, u16 ms);
 ^~~
C:/SGDK/inc/joy.h:402:23: error: unknown type name 'u16'
 u16 JOY_waitPressTime(u16 joy, u16 btn, u16 ms);
                       ^~~
C:/SGDK/inc/joy.h:402:32: error: unknown type name 'u16'
 u16 JOY_waitPressTime(u16 joy, u16 btn, u16 ms);
                                ^~~
C:/SGDK/inc/joy.h:402:41: error: unknown type name 'u16'
 u16 JOY_waitPressTime(u16 joy, u16 btn, u16 ms);
                                         ^~~
make: *** [out/main.o] Error 1
23:00:04: The process "C:\SGDK\bin\make.exe" exited with code 2.
Error while building/deploying project PrjSurvival (kit: Desktop)
The kit Desktop has configuration issues which might be the root cause for this problem.
When executing step "Make"

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Compile Error with var type.

Post by Stef » Mon Jun 17, 2019 1:41 pm

Do you have

Code: Select all

#include "genesis.h"
in the headers inclusion part of your code ?
Also how do you compile (command line / ide) ?

orlanrod
Very interested
Posts: 99
Joined: Fri Sep 25, 2015 7:46 pm

Re: Compile Error with var type.

Post by orlanrod » Mon Jun 17, 2019 4:22 pm

Stef wrote:
Mon Jun 17, 2019 1:41 pm
Do you have

Code: Select all

#include "genesis.h"
in the headers inclusion part of your code ?
Also how do you compile (command line / ide) ?
Oops, i used "<genesis.h>", that corrected it. Thanks!

Post Reply