I want to program a fx cg 20 application. For some reason there is an error. It says

Code:

prizmsdk-0.4a0\lib\gcc\sh3eb-elf\4.8.1\include\stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
make[1]: *** [main.o] Error 1
make: *** [build] Error 2


So I went to stdint.h in that directory:

Code:

#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
#  undef __STDC_LIMIT_MACROS
#  define __STDC_LIMIT_MACROS
#  undef __STDC_CONSTANT_MACROS
#  define __STDC_CONSTANT_MACROS
# endif
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif


Is there a second stdint.h file somewhere? Or how to fix this?

I tried it in both versions of the prizm-sdk (0.3 & 0.4a0)
Error without the #include_next <stdint.h>:

Code:

 1 [main] [ 6608 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list cygwin@cygwin.com
sh3eb-elf-gcc -MMD -MP -MF C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/build/main.d -Os -Wall -mb -m4a-nofpu -mhitachi -nostdlib   -IC:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/build -IC:/Users/Sami/Desktop/PrizmSDK-0.4a0/include -c C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c -o main.o
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c: In function 'handleScale':
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:374:27: error: 'VRAM_ADDRESS' undeclared (first use in this function)
   mandelQuater((uint16_t*)VRAM_ADDRESS,SCREEN_WIDTH,SCREEN_HEIGHT,deep,z,scaleN[0],scaleN[1],0,scaleN[2],scaleN[3],0);
                           ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:374:27: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:374:40: error: 'SCREEN_WIDTH' undeclared (first use in this function)
   mandelQuater((uint16_t*)VRAM_ADDRESS,SCREEN_WIDTH,SCREEN_HEIGHT,deep,z,scaleN[0],scaleN[1],0,scaleN[2],scaleN[3],0);
                                        ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:374:53: error: 'SCREEN_HEIGHT' undeclared (first use in this function)
   mandelQuater((uint16_t*)VRAM_ADDRESS,SCREEN_WIDTH,SCREEN_HEIGHT,deep,z,scaleN[0],scaleN[1],0,scaleN[2],scaleN[3],0);
                                                     ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c: In function 'handleUDLR':
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:392:28: error: 'VRAM_ADDRESS' undeclared (first use in this function)
   uint16_t*vram=(uint16_t*)VRAM_ADDRESS;
                            ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:393:69: error: 'SCREEN_WIDTH' undeclared (first use in this function)
   int deltaX=(int)(((int64_t)scaleN[0]-(int64_t)scaleO[0])*(int64_t)SCREEN_WIDTH/(int64_t)divX);
                                                                     ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:394:69: error: 'SCREEN_HEIGHT' undeclared (first use in this function)
   int deltaY=(int)(((int64_t)scaleN[2]-(int64_t)scaleO[2])*(int64_t)SCREEN_HEIGHT/(int64_t)divY);
                                                                     ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c: In function 'main':
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:466:18: error: 'SCREEN_WIDTH' undeclared (first use in this function)
  setScale(scaleN,SCREEN_WIDTH,SCREEN_HEIGHT);
                  ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:466:31: error: 'SCREEN_HEIGHT' undeclared (first use in this function)
  setScale(scaleN,SCREEN_WIDTH,SCREEN_HEIGHT);
                               ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:485:17: error: 'KEY_FOR_EXIT' undeclared (first use in this function)
   if(keyPressed(KEY_FOR_EXIT)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:495:17: error: 'KEY_F1' undeclared (first use in this function)
   if(keyPressed(KEY_F1)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:500:17: error: 'KEY_F2' undeclared (first use in this function)
   if(keyPressed(KEY_F2)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:505:17: error: 'KEY_F3' undeclared (first use in this function)
   if(keyPressed(KEY_F3)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:509:17: error: 'KEY_1' undeclared (first use in this function)
   if(keyPressed(KEY_1)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:514:17: error: 'KEY_2' undeclared (first use in this function)
   if(keyPressed(KEY_2)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:519:17: error: 'KEY_3' undeclared (first use in this function)
   if(keyPressed(KEY_3)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:524:17: error: 'KEY_4' undeclared (first use in this function)
   if(keyPressed(KEY_4)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:529:17: error: 'KEY_5' undeclared (first use in this function)
   if(keyPressed(KEY_5)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:534:17: error: 'KEY_6' undeclared (first use in this function)
   if(keyPressed(KEY_6)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:540:17: error: 'KEY_SHIFT' undeclared (first use in this function)
   if(keyPressed(KEY_SHIFT)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:548:17: error: 'KEY_ALPHA' undeclared (first use in this function)
   if(keyPressed(KEY_ALPHA)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:556:17: error: 'KEY_UP' undeclared (first use in this function)
   if(keyPressed(KEY_UP)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:563:17: error: 'KEY_DOWN' undeclared (first use in this function)
   if(keyPressed(KEY_DOWN)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:570:17: error: 'KEY_LEFT' undeclared (first use in this function)
   if(keyPressed(KEY_LEFT)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:577:17: error: 'KEY_RIGHT' undeclared (first use in this function)
   if(keyPressed(KEY_RIGHT)){
                 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:589:27: error: 'VRAM_ADDRESS' undeclared (first use in this function)
     mandelMask((uint16_t*)VRAM_ADDRESS,SCREEN_WIDTH,SCREEN_HEIGHT,deep,z,scaleN[0],scaleN[1],0,scaleN[2],scaleN[3],0,i&3,i/4,3);
                           ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:590:5: warning: implicit declaration of function 'FlipScreen' [-Wimplicit-function-declaration]
     FlipScreen();
     ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c: In function 'keyPressed':
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:54:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c: In function 'checkExit':
C:/Users/Sami/Desktop/PrizmSDK-0.4a0/projects/Mandelbrot/src/main.c:67:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

Project Files:
https://github.com/ComputerNerd/Mandelbrot-Casio-Prizm-Explorer/tree/master/src

Makefile:

Code:

#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
# Set toolchain location in an environment var for future use, this will change
# to use a system environment var in the future.
#---------------------------------------------------------------------------------
ifeq ($(strip $(FXCGSDK)),)
export FXCGSDK := $(abspath ../../)
endif

include $(FXCGSDK)/common/prizm_rules


#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET      :=   $(notdir $(CURDIR))
BUILD      :=   build
SOURCES      :=   src
DATA      :=   data 
INCLUDES   :=

#---------------------------------------------------------------------------------
# options for code and add-in generation
#---------------------------------------------------------------------------------

MKG3AFLAGS := -n basic:Mandelbrot -i uns:../unselected.bmp -i sel:../selected.bmp

CFLAGS   = -Os -Wall $(MACHDEP) $(INCLUDE)
CXXFLAGS   =   $(CFLAGS)

LDFLAGS   = $(MACHDEP) -T$(FXCGSDK)/common/prizm.ld -Wl,-static -Wl,-gc-sections

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS   :=   -lfxcg -lgcc

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS   :=

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT   :=   $(CURDIR)/$(TARGET)

export VPATH   :=   $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
               $(foreach dir,$(DATA),$(CURDIR)/$(dir))

export DEPSDIR   :=   $(CURDIR)/$(BUILD)

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES   :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES   :=   $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
   export LD   :=   $(CC)
else
   export LD   :=   $(CXX)
endif

export OFILES   :=   $(addsuffix .o,$(BINFILES)) \
               $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
               $(sFILES:.s=.o) $(SFILES:.S=.o)

#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE   :=   $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
               $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
               -I$(CURDIR)/$(BUILD) -I$(LIBFXCG_INC)

#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS   :=   $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
               -L$(LIBFXCG_LIB)

export OUTPUT   :=   $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean

#---------------------------------------------------------------------------------
$(BUILD):
   @[ -d $@ ] || mkdir $@
   @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

#---------------------------------------------------------------------------------
export CYGWIN := nodosfilewarning
clean:
   $(RM) -fr $(BUILD) $(OUTPUT).bin $(OUTPUT).g3a

#---------------------------------------------------------------------------------
else

DEPENDS   :=   $(OFILES:.o=.d)

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).g3a: $(OUTPUT).bin
$(OUTPUT).bin: $(OFILES)


-include $(DEPENDS)

#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------


Makefile.old:

Code:

PREFIX=../../
CC=$(PREFIX)bin/sh3eb-elf-gcc.exe
MKG3A=$(PREFIX)bin/mkg3a.exe
OUTDIR=.
RM=del
CFLAGS=-m4-nofpu -mb -Os -mhitachi -Wall -nostdlib -I$(PREFIX)include -lfxcg -lgcc -L$(PREFIX)lib
LDFLAGS=$(CFLAGS) -T../common/prizm.ld -Wl,-static -Wl,-gc-sections
CSOURCES=main.c
OBJECTS=$(SHSOURCES:.s=.o) $(CSOURCES:.c=.o)
SHSOURCES=
BIN=$(OUTDIR)Mandelbrot.bin
ADDIN=$(BIN:.bin=.g3a)
 
all: $(ADDIN)
 
$(BIN): $(OBJECTS)
   $(CC) $(addprefix $(OUTDIR)/,$<)  $(LDFLAGS) -o $@
 
$(ADDIN): $(BIN)
   $(MKG3A) -n :Mandelbrot $< $@
 
.s.o:
   $(CC) -c $(CFLAGS) $< -o $(OUTDIR)/$@
 
.c.o:
   $(CC) -c $(CFLAGS) $< -o $(OUTDIR)/$@
 
clean:
   $(RM) $(addprefix $(OUTDIR)\,$(OBJECTS)) $(BIN) $(ADDIN)
I assume whatever you've done to automatically generate include paths is doing something wrong. Check that the original makefile works, then debug yours.
The original Makefile works for me. I use the latest libfxcg from Github. Try using that and see if it helps github: https://github.com/Jonimoose/libfxcg
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement