Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

We are trying to compile our application code for BREW MP device and are facing issues in the last stage of mod file creation - linking. We are using Code Sourcery compiler ver. 4.4.1 G++ Lite 


Below is the error report. 

"arm-none-eabi-g++" -Wl,--entry=AEEMod_Load -Wl,--emit-relocs -Wl,--default-script=C:/PROGRA~1/Qualcomm/BREWMP~1/TOOLSE~1.163/bin/elf2mod/src/gnu/elf2mod.x -Wl,--no-wchar-size-warning -o armgcc_Debug/finditmaps.elf armgcc_Debug/AEEAppGen.o armgcc_Debug/AEEModGen.o armgcc_Debug/Applet.o armgcc_Debug/AppController.o armgcc_Debug/Array.o armgcc_Debug/block_allocator.o armgcc_Debug/Bounds.o armgcc_Debug/CDataManager.o armgcc_Debug/Color.o armgcc_Debug/json.o armgcc_Debug/JsonCreator.o armgcc_Debug/JsonParser.o armgcc_Debug/MessageDetail.o armgcc_Debug/Stack.o armgcc_Debug/String.o armgcc_Debug/Telephony.o armgcc_Debug/UtilityManager.o armgcc_Debug/WebController.o armgcc_Debug/ActivityIndicator.o armgcc_Debug/AddressBook.o armgcc_Debug/AddressBookCell.o armgcc_Debug/AlertView.o armgcc_Debug/Button.o armgcc_Debug/CheckBox.o armgcc_Debug/ConstraintContainer.o armgcc_Debug/Container.o armgcc_Debug/DirectionInstCell.o armgcc_Debug/FavLocCell.o armgcc_Debug/Graphics.o armgcc_Debug/HeaderView.o armgcc_Debug/ImageView.o armgcc_Debug/Label.o armgcc_Debug/List.o armgcc_Debug/ListViewCell.o armgcc_Debug/MapView.o armgcc_Debug/POICategoryCell.o armgcc_Debug/POICell.o armgcc_Debug/PopupMenu.o armgcc_Debug/RootContainer.o armgcc_Debug/SMSView.o armgcc_Debug/SoftKeys.o armgcc_Debug/TextBox.o armgcc_Debug/View.o armgcc_Debug/XYContainer.o armgcc_Debug/DirectionScreen.o armgcc_Debug/FavoriteLocationScreen.o armgcc_Debug/HomeScreen.o armgcc_Debug/Screen.o armgcc_Debug/ScreenController.o armgcc_Debug/SearchScreen.o armgcc_Debug/SplashScreen.o armgcc_Debug/VisualStatesController.o armgcc_Debug/AddressLocationManager.o armgcc_Debug/DirectionController.o armgcc_Debug/Geocoder.o armgcc_Debug/GISController.o armgcc_Debug/Location.o armgcc_Debug/LocationManager.o armgcc_Debug/MapController.o armgcc_Debug/MatrixAnalyser.o armgcc_Debug/PlaceMark.o armgcc_Debug/ReverseGeocoder.o 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-abort.o): In function `abort': 
abort.c:(.text+0x10): undefined reference to `_exit' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r': 
sbrkr.c:(.text+0x18): undefined reference to `_sbrk' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-signalr.o): In function `_getpid_r': 
signalr.c:(.text+0x4): undefined reference to `_getpid' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-signalr.o): In function `_kill_r': 
signalr.c:(.text+0x2c): undefined reference to `_kill' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-writer.o): In function `_write_r': 
writer.c:(.text+0x20): undefined reference to `_write' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-closer.o): In function `_close_r': 
closer.c:(.text+0x18): undefined reference to `_close' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-fstatr.o): In function `_fstat_r': 
fstatr.c:(.text+0x1c): undefined reference to `_fstat' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-isattyr.o): In function `_isatty_r': 
isattyr.c:(.text+0x18): undefined reference to `_isatty' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-lseekr.o): In function `_lseek_r': 
lseekr.c:(.text+0x20): undefined reference to `_lseek' 
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-readr.o): In function `_read_r': 
readr.c:(.text+0x20): undefined reference to `_read' 
collect2: ld returned 1 exit status

Hi Kamesh, I was able to repliacte the issue on C++ app, worked fine on C app. On C++ app, Issue is happening becuase some system header files files are not available at the time of compilation. Please make following changes in your MAK file, this will fix the issue. replace with your project name 
ifeq ($(V_TARGET),armgcc)
_C_SRCS +=glibc_stubs
endif

ifneq ($(V_TARGET),Win32)
_C_SRCS +=mod_malloc
endif

# specify paths to search for dependencies
VPATH +=$(BREWMP_PLATFORM_DIR)/system/src

for ex: Here my project name is mycppapp

ifeq ($(V_TARGET),armgcc)
mycppapp_C_SRCS +=glibc_stubs
endif

ifneq ($(V_TARGET),Win32)
mycppapp_C_SRCS +=mod_malloc
endif

# specify paths to search for dependencies
VPATH +=$(BREWMP_PLATFORM_DIR)/system/src Note: This MAK file will be deleted once you build project again so check disbale automatic makefile generation checkbox, follow below steps: Open MS visual studio-> open you project->Select "Project" from menu pane->Select "Brew Mp properties"-> This will open "Brew MP Properties "window -> Select "Advanced" tab-> check "disbale automatic makefile generation" checkbox. This will not update changes we did earlier in MAK file. Thanks, Mahesh

Hi Kamesh, I was able to repliacte the issue on C++ app, worked fine on C app. On C++ app, Issue is happening becuase some system header files files are not available at the time of compilation. Please make following changes in your MAK file, this will fix the issue. replace with your project name 
ifeq ($(V_TARGET),armgcc)
_C_SRCS +=glibc_stubs
endif

ifneq ($(V_TARGET),Win32)
_C_SRCS +=mod_malloc
endif

# specify paths to search for dependencies
VPATH +=$(BREWMP_PLATFORM_DIR)/system/src

for ex: Here my project name is mycppapp

ifeq ($(V_TARGET),armgcc)
mycppapp_C_SRCS +=glibc_stubs
endif

ifneq ($(V_TARGET),Win32)
mycppapp_C_SRCS +=mod_malloc
endif

# specify paths to search for dependencies
VPATH +=$(BREWMP_PLATFORM_DIR)/system/src Note: This MAK file will be deleted once you build project again so check disbale automatic makefile generation checkbox, follow below steps: Open MS visual studio-> open you project->Select "Project" from menu pane->Select "Brew Mp properties"-> This will open "Brew MP Properties "window -> Select "Advanced" tab-> check "disbale automatic makefile generation" checkbox. This will not update changes we did earlier in MAK file. Thanks, Mahesh