#27716 - [Titan] - Tue Oct 19, 2004 11:44 pm
Hi all,
I'm trying to get Apex Audio System to work in my project, but somehow I can't link the library to the rest of my program.
I'm using MSVS 6.0 as development environment, and the folowing makefile:
this has worked without problems until I tried to link a library to my project.
My source file, linkscript and crt0.s come directly from "example2" from AAS. The directory structure is exactly the same as in the sample. Yet when I try to build my project, I get the following error:
As you can see, it is able to find the library (there's no error indicating the library could not be found) but somehow it's not able to find any of the library's functions.
What am I doing wrong here? Any suggestions?
t.i.a.
/me get's back to banging his head against the wall...
I'm trying to get Apex Audio System to work in my project, but somehow I can't link the library to the rest of my program.
I'm using MSVS 6.0 as development environment, and the folowing makefile:
Code: |
# ------------------------------------------
# Title: Default Makefile for use in VC++ # File: Dune2.mak # Revision: 01/06/2002 # # Author: Benjamin D. Hale # Orignally by: Jaap Suter # Contributed to by: Christer Andersson # # Info: This file is contains the make-instructions # for the project. Replace DEVDIR with the appropriate # base directory for devkitadv. After you make the # needed modifications here rename this file to # <project_name>.mak so Visual C++ does not get # confused. # ------------------------------------------- # ------------------------------------------- # Project name definition makes this whole thing # a lot easier to use. Only two total modifications # (other than what .o files will be needed) # should be needed to get this working with your # compiler and Visual C++. Replace "Default" with # your project's name. # ------------------------------------------- PROJECT = AASExample # ------------------------------------------- # Define some directories; # ------------------------------------------- # ------------------------------------------- # Base Directory for gcc arm-agb-elf replace with # wherever you put your gba devkitadv files. # ------------------------------------------- DEVDIR = D:\GBA\DevkitAdv # ------------------------------------------- # Source directory (where your project's source files are located.) # ------------------------------------------- SRCDIR = D:\GBA\projects\AAS\ # ------------------------------------------- # Compiler Directories for binaries, includes and libs. # ------------------------------------------- CMPDIR = $(DEVDIR)\bin LIBDIR = $(DEVDIR)\lib\gcc-lib\arm-agb-elf\3.0.2\interwork LIBDIR2 = $(DEVDIR)\arm-agb-elf\lib\interwork LIBDIR3 = $(SRCDIR)\LibAAS INCDIR = $(DEVDIR)\lib\gcc-lib\arm-agb-elf\3.0.2\include INCDIR2 = $(DEVDIR)\arm-agb-elf\include INCDIR3 = $(SRCDIR)\LibAAS # ------------------------------------------- # END of directory defines # ------------------------------------------- # ------------------------------------------- # Define what extensions we use; # ------------------------------------------- .SUFFIXES : .cpp .c .s # ------------------------------------------- # Define the flags for the compilers; # ------------------------------------------- CFLAGS = -I $(INCDIR3) -I $(INCDIR2) -I $(INCDIR) -I $(SRCDIR) -mthumb-interwork -c -g -O3 -Wall -fverbose-asm SFLAGS = -I $(INCDIR2) -I $(INCDIR) -mthumb-interwork LDFLAGS = -L $(LIBDIR3) -L $(LIBDIR) -L $(LIBDIR2) -T LinkScript -l AAS # ------------------------------------------- # Define the list of all O files; # Just follow the syntax shown to add any # other objects your project may need to # compile properly. You will need to add # files to this part to make it work with # your project add a \ to the end of all o # files except the last one. Like below. # ------------------------------------------- O_FILES = \ crt0.o \ AAS_Data.o \ AASExample.o # ------------------------------------------- # There should be no need to modify anything # below here. # ------------------------------------------- # ------------------------------------------- # Define the final dependecy; # ------------------------------------------- all : $(PROJECT).gba # ------------------------------------------- # Define the copy from .elf to .bin file # ------------------------------------------- $(PROJECT).gba : $(PROJECT).elf $(CMPDIR)\objcopy -O binary $(PROJECT).elf $(PROJECT).gba -@echo ------------------------------------------ -@echo Done -@echo ------------------------------------------ $(PROJECT).elf : $(O_FILES) $(CMPDIR)\ld $(LDFLAGS) -o $(PROJECT).elf $(O_FILES) -lstdc++ -lc -lgcc -@echo ------------------------------------------ -@echo Linking Done -@echo ------------------------------------------ AAS_Data.o:: conv2aas AAS_Data $(CMPDIR)\as $(SFLAGS) -o $@ AAS_Data.s # ------------------------------------------- # Define each compile; # ------------------------------------------- {$(SRCDIR)}.cpp.o:: $(CMPDIR)\gcc $(CFLAGS) $< -@echo ------------------------------------------ -@echo CPP-Sources Compiled -@echo ------------------------------------------ {$(SRCDIR)}.c.o:: $(CMPDIR)\gcc $(CFLAGS) $< -@echo ------------------------------------------ -@echo C-sources Compiled -@echo ------------------------------------------ # ------------------------------------------- # Define each assemble; # ------------------------------------------- {$(SRCDIR)}.s.o: $(CMPDIR)\as $(SFLAGS) $(SRCDIR)\$*.s -o$@ -@echo ------------------------------------------ -@echo ASM-Sources Compiled -@echo ------------------------------------------ # ------------------------------------------- # Any problems with getting this working email # questions to whatzdat_pimp@hotmail.com . # This was tested on devkitadv r4 and Visual C++ 6 # on a p3 450/512mb/Windows XP Pro. # ------------------------------------------- # EOF; |
this has worked without problems until I tried to link a library to my project.
My source file, linkscript and crt0.s come directly from "example2" from AAS. The directory structure is exactly the same as in the sample. Yet when I try to build my project, I get the following error:
Code: |
--------------------Configuration: AASExample - Win32 Debug--------------------
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. conv2aas AAS_Data /---------------------------------------------\ | Conv2AAS v1.07 WAV, RAW & MOD -> AAS | | Copyright (c) 2003, Apex Designs | \---------------------------------------------/ Adding WAV Ambulance.wav...Done! Adding RAW Boom.raw...Done! Adding MOD CreamOfTheEarth.mod...4 channels...Done! song_length:27 last_pattern:27 Writing AAS_SampleData (Unique:18 Actual:18 Length:123780)...Done! Writing AAS_PatternData (Unique:66 Actual:112 Length:16896)...Done! D:\GBA\DevkitAdv\bin\as -I D:\GBA\DevkitAdv\arm-agb-elf\include -I D:\GBA\DevkitAdv\lib\gcc-lib\arm-agb-elf\3.0.2\include -mthumb-interwork -o AAS_Data.o AAS_Data.s D:\GBA\DevkitAdv\bin\ld -L D:\GBA\projects\AAS\LibAAS -L D:\GBA\DevkitAdv\lib\gcc-lib\arm-agb-elf\3.0.2\interwork -L D:\GBA\DevkitAdv\arm-agb-elf\lib\interwork -T LinkScript -l AAS -o AASExample.elf crt0.o AAS_Data.o AASExample.o -lstdc++ -lc -lg cc crt0.o: In function `jump_intr_AAS': crt0.o(.iwram+0x108): undefined reference to `AAS_FastTimer1InterruptHandler' AASExample.o: In function `AgbMain': D:/GBA/projects/AAS/AASExample.c:53: undefined reference to `AAS_SetConfig' D:/GBA/projects/AAS/AASExample.c:56: undefined reference to `AAS_ShowLogo' D:/GBA/projects/AAS/AASExample.c:63: undefined reference to `AAS_MOD_Play' D:/GBA/projects/AAS/AASExample.c:77: undefined reference to `AAS_SFX_Play' D:/GBA/projects/AAS/AASExample.c:84: undefined reference to `AAS_SFX_Play' D:/GBA/projects/AAS/AASExample.c:79: undefined reference to `AAS_SFX_Stop' AASExample.o:D:/GBA/projects/AAS/AASExample.c:16: undefined reference to `AAS_DoWork' NMAKE : fatal error U1077: 'D:\GBA\DevkitAdv\bin\ld' : return code '0x1' Stop. Error executing NMAKE. AASExample.gba - 1 error(s), 0 warning(s) |
As you can see, it is able to find the library (there's no error indicating the library could not be found) but somehow it's not able to find any of the library's functions.
What am I doing wrong here? Any suggestions?
t.i.a.
/me get's back to banging his head against the wall...