The solution to “undefined reference”and “relocation truncated” (mostly concern cell-id stuffs)
来源:互联网 发布:系统清理软件哪个好 编辑:程序博客网 时间:2024/05/21 19:41
The solution to “undefined reference”and “relocation truncated” (mostly concern cell-id stuffs)
While covering a program concerning RBasicGsmPhone or so stuffs,i got into the problem that my program can compile in the emulator but cannot work in the ARMI release mode (or maybe THUMB which I have not tried). The Problem is mainly
undefined reference to `RBasicGsmPhone::RBasicGsmPhone(void)' relocation truncated to fit: ARM_26...
RBasicGsmPhone::RBasicGsmPhone(void) ...
Having checked up the program i could get it through on the emulator but not ARMI.I searched through the nokia forum and got nothing.Lots of people ever got the same problem as " undefined reference " and "relocation truncated",especially about the "cell-id" stuff,but without any solution. I saw one thread that is similar to my problem:
GeoLog.in(GeoLogContainer.o)(.text+0x494):GeoLogContaine: relocationtruncated to fit: ARM_26 RFs::Connect(int)
GeoLog.in(GeoLogContainer.o)(.text+0x4b4):GeoLogContaine: undefined reference to `RFile::Open(RFs &, TDesC16 const &, unsigned
http://discussion.forum.nokia.com/fo...runcated+write
here the problem is that it used RFile and RFs,and using the two you have to include : Location: f32file.h (include it in your .cpp file) Link against: efsrv.lib (include in your .mmp file)
Back to my problem,i have
include <etelbgsm.h>
include <etel.h>
and in my mmp
LIBRARY etel.lib // Telephony server LIBRARY
gsmbas.lib // Get cell id
Just as above,i also include a gsmbas.lib in the :Symbian/7.0s/Series60_v21_C/Epoc32/release/armi/urel,which i got from (SYSINFO60/data). i have got all needed then it may because of the wrong version of some *.h or *.lib.
Why not have a try? I download the Series60_v20 one and copy the wanted lib to my Series60_v21_C/.../urel and compile again .
Compile and BANG! IT WORKS.
So,i think that almost all similar problems are caused by short of *.lib(s) or *.h(s) for the needed ,or by short of PROPER ones. Or caused by broken ones.
Due to my little experience ,I do not know it to the deep , I hope someone can explain it more clearly or at least point out my misunderstand. easy way to solve the problem, you can just replace it with a proper one.
Then that is all. also i got a question for your experts: is there anything with the order in which the libraries were set in the mmp file? What does this thread mean? http://discussion.forum.nokia.com/fo...794#post290794
download the gsmbas.lib for armi urel here
http://dl2.csdn.net/down4/20070714/14095347908.rar
While covering a program concerning RBasicGsmPhone or so stuffs,i got into the problem that my program can compile in the emulator but cannot work in the ARMI release mode (or maybe THUMB which I have not tried). The Problem is mainly
undefined reference to `RBasicGsmPhone::RBasicGsmPhone(void)' relocation truncated to fit: ARM_26...
RBasicGsmPhone::RBasicGsmPhone(void) ...
Having checked up the program i could get it through on the emulator but not ARMI.I searched through the nokia forum and got nothing.Lots of people ever got the same problem as " undefined reference " and "relocation truncated",especially about the "cell-id" stuff,but without any solution. I saw one thread that is similar to my problem:
GeoLog.in(GeoLogContainer.o)(.text+0x494):GeoLogContaine: relocationtruncated to fit: ARM_26 RFs::Connect(int)
GeoLog.in(GeoLogContainer.o)(.text+0x4b4):GeoLogContaine: undefined reference to `RFile::Open(RFs &, TDesC16 const &, unsigned
http://discussion.forum.nokia.com/fo...runcated+write
here the problem is that it used RFile and RFs,and using the two you have to include : Location: f32file.h (include it in your .cpp file) Link against: efsrv.lib (include in your .mmp file)
Back to my problem,i have
include <etelbgsm.h>
include <etel.h>
and in my mmp
LIBRARY etel.lib // Telephony server LIBRARY
gsmbas.lib // Get cell id
Just as above,i also include a gsmbas.lib in the :Symbian/7.0s/Series60_v21_C/Epoc32/release/armi/urel,which i got from (SYSINFO60/data). i have got all needed then it may because of the wrong version of some *.h or *.lib.
Why not have a try? I download the Series60_v20 one and copy the wanted lib to my Series60_v21_C/.../urel and compile again .
Compile and BANG! IT WORKS.
So,i think that almost all similar problems are caused by short of *.lib(s) or *.h(s) for the needed ,or by short of PROPER ones. Or caused by broken ones.
Due to my little experience ,I do not know it to the deep , I hope someone can explain it more clearly or at least point out my misunderstand. easy way to solve the problem, you can just replace it with a proper one.
Then that is all. also i got a question for your experts: is there anything with the order in which the libraries were set in the mmp file? What does this thread mean? http://discussion.forum.nokia.com/fo...794#post290794
download the gsmbas.lib for armi urel here
http://dl2.csdn.net/down4/20070714/14095347908.rar
answer from nokia forum champion symbianyucca:
“undefined reference” mena that the implementation is not found, which means that the header for the class was located but the library was not.
So to get rid of this you just need to addd the library to the project and re-build the workspace (i.er. re-import with codewarrion for example), and then the bceed.
Anyway, if the library is not present in the SDK, then of course you can not use the API. You should never copy librarties from older SDK's to never ones, since they might not be compatible, instead you should check if you could use some other API that is present to get the task done.
If not, then you could check if ytou could use the channels available to obtain the required libraries from Nokia.
So to get rid of this you just need to addd the library to the project and re-build the workspace (i.er. re-import with codewarrion for example), and then the bceed.
Anyway, if the library is not present in the SDK, then of course you can not use the API. You should never copy librarties from older SDK's to never ones, since they might not be compatible, instead you should check if you could use some other API that is present to get the task done.
If not, then you could check if ytou could use the channels available to obtain the required libraries from Nokia.
- The solution to “undefined reference”and “relocation truncated” (mostly concern cell-id stuffs)
- relocation truncated to fit: R_X86_64_PC32
- relocation truncated to fit: R_X86_64_32
- relocation truncated to fit: R_MIPS_CALL16 问题!
- relocation truncated to fit: R_X86_64_PC32错误排除
- relocation truncated to fit: R_MIPS_26 against
- relocation truncated to fit: R_MIPS_CALL16 问题!
- solution :(.text+0x18c1): undefined reference to `uuid_unparse'
- 编译SDL( solution:SDL_image.h:undefined reference to `IMG_Load' )
- undefined reference to `gzopen' 'gzwrite' and 'gzclose'
- undefined reference to dlopen, dlclose, dlsym and
- Link error: relocation truncated to fit: R_MIPS_GPREL16 time
- 解决relocation truncated to fit: R_PPC_ADDR24 的问题
- Building Error: relocation truncated to fit: R_X86_64_32S against symbol 'XXX'
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- undefined reference to 'floor'/undefined reference to `&
- undefined reference to 'floor'/undefined reference to
- 往生咒(二)
- “名字相同扰乱业务” 北京谷歌科技起诉谷歌搜寻引擎
- ChinaJoy亲历 九城VS盛大
- Java正则表达式初学者指南
- Developer Express .Net 2005 V7.2.1 crack
- The solution to “undefined reference”and “relocation truncated” (mostly concern cell-id stuffs)
- 什么是publickeytoken及publickeytoken的作用
- VERITAS的全线存储备份容灾解决方案
- 是可忍,孰不可忍 ──我看南京虐狗事件( 易中天)
- 实用计算机网络编程 作业1.doc
- Microsoft .NET Pet Shop 4 架构与技术分析
- 疯狂《WoW》玩家 2人控制46机
- DVDrip 名词解释
- 采用Oracle ArchiveLog模式和非ArchiveLog模式对备份恢复的影响