Welcome! Log In Create A New Profile

Advanced

Compile Error

Posted by pinball Wizard 
Compile Error
June 14, 2009 05:32AM
When I go to compile this "secret" program it fail with error 2. Here is the output:
fat.c
In file included from /Users/****/Desktop/HBB/HBB/source/fat.c:5:
/Users/****/Desktop/HBB/HBB/source/fat.h:5:17: warning: fat.h: No such file or directory
/Users/****/Desktop/HBB/HBB/source/fat.h:9:25: warning: sdcard/gcsd.h: No such file or directory
In file included from /Users/****/Desktop/HBB/HBB/source/fat.c:5:
/Users/****/Desktop/HBB/HBB/source/fat.h:22: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
/Users/****/Desktop/HBB/HBB/source/fat.c: In function 'Fat_Mount':
/Users/****/Desktop/HBB/HBB/source/fat.c:13: error: 'fatDevice' has no member named 'interface'
/Users/****/Desktop/HBB/HBB/source/fat.c:18: warning: implicit declaration of function 'fatMountSimple'
/Users/****/Desktop/HBB/HBB/source/fat.c:18: error: 'fatDevice' has no member named 'interface'
/Users/****/Desktop/HBB/HBB/source/fat.c: In function 'Fat_Unmount':
/Users/****/Desktop/HBB/HBB/source/fat.c:28: warning: implicit declaration of function 'fatUnmount'
/Users/****/Desktop/HBB/HBB/source/fat.c:31: error: 'fatDevice' has no member named 'interface'
make[1]: *** [fat.o] Error 1
make: *** [build] Error 2

The first thing that stands out to me is that it says: sdcard/gcsd.h isn't found. that sound like a problem...
Re: Compile Error
June 14, 2009 05:33AM
Forgot to post my makefile just incase:
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC)
endif

include $(DEVKITPPC)/wii_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		:=	source source/libpng source/libpng/pngu
DATA		:=	data  
INCLUDES	:=

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------

CFLAGS	= -g -O2 -mrvl -Wall $(MACHDEP) $(INCLUDE)
CXXFLAGS	=	$(CFLAGS)

LDFLAGS	=	-g $(MACHDEP) -mrvl -Wl,-Map,$(notdir $@).map

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS	:=	-lpng -lfat -lwiiuse -lbte -logc -lm -lz

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

#---------------------------------------------------------------------------------
# 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$(LIBOGC_INC)

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

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

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

#---------------------------------------------------------------------------------
clean:
	@echo clean ...
	@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol

#---------------------------------------------------------------------------------
run:
	psoload $(TARGET).dol

#---------------------------------------------------------------------------------
reload:
	psoload -r $(TARGET).dol


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

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

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)

#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o	:	%.jpg
#---------------------------------------------------------------------------------
	@echo $(notdir $<)
	$(bin2o)

-include $(DEPENDS)

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

Re: Compile Error
June 14, 2009 05:12PM
This could be a Compiler Issue or a Installation Issue...
---------

Check These Things First:

1) Does Your User Folder have one name , Like did you do First name (space) Last name ?
Solution for 1) - Copy the data to a folder with out spaces, i dropped my stuff in C:\Wii\
Why ) Msys hates spaced folders!

2)Did You Install With Windows Installer
Solution 2) - Download the DevkitPro windows installer
Solution 2.1) -Restart, This lets Windows time to take notice the environment variables
Why) All your Data is included in an enviroment variable because typing "bin2s" is easier than typing "C:/devkitpro/devkitPPC/bin/bin2s"
----------------
Hope This Helps, i dont see any issues with your makefile
Re: Compile Error
June 14, 2009 10:29PM
I am on a mac so the Windows installer doesn't work for me (obviously). Also, the folder this is in is all names without spaces. I always mess stuff up that way and was good about it this time... I used the newest Devkit installer for mac and then updated my Devkit folder that is in /opt/
Re: Compile Error
June 15, 2009 12:11AM
Did you check the wiki... not much else i can say, i don't own a mac so im not familiar with the platform like i am with windows
Re: Compile Error
June 15, 2009 02:58AM
I'm going to try and reinstall. I think that the install wasn't properly done and that libogc is missing files.
Re: Compile Error
June 15, 2009 03:09AM
Sorry to double post but some people might have read the above post...

I reinstalled my environment and realized that libogc was a very very old version so I updated that too. Now I am getting this error:
fat.c
cc1: error: invalid option `rvl'
cc1: error: invalid option `rvl'
make[1]: *** [fat.o] Error 1
make: *** [build] Error 2

Re: Compile Error
June 15, 2009 09:18PM
Try updating libfat (it's separate from libogc). It sounds like you may have a really old version of that too then.



Edited 1 time(s). Last edit at 06/15/2009 09:19PM by Arikado.
Re: Compile Error
June 16, 2009 11:54PM
I am still getting the same error. Hmm... Looking in my fat.c file rvl doesn't even come up in any of the code.

EDIT: Would it help to post the fat.c file?



Edited 1 time(s). Last edit at 06/16/2009 11:56PM by pinball Wizard.
Re: Compile Error
June 17, 2009 03:57AM
It is an error in my environment. I attempted to compile a working version of the source code (the stuff I am compiling is all modified code from a program) and got the same error. So if someone would like to zip or tarball their /opt directory (on a mac) and upload it somewhere for me to get and install that would be great.
Re: Compile Error
June 17, 2009 11:53AM
cc1: error: invalid option `rvl' means that you are using the wrong compiler, it doesn't have any idea what the command line option means.
Re: Compile Error
June 17, 2009 01:29PM
Hmm... How would I fix that? (I want to now take the time to thank everyone for their patience with my lack of knowledge in the wii development section).
Re: Compile Error
June 20, 2009 02:26AM
The weirdest part is that I can compile the "Hello World" program that is the default xcode project.
Sorry, only registered users may post in this forum.

Click here to login