第一篇:IAR 6 20編譯錯(cuò)誤
IAR 6.20編譯錯(cuò)誤清單
1、①錯(cuò)誤描述:Tool Internal Error:
Internal Error: [CoreUtil/General]: Access violation(0xc0000005)at 007588A5(reading from address 0x0)
Internal Error: [CoreUtil/General]: Access violation(0xc0000005)at 007588A5(reading from address 0x0)
Error while running C/C++ Compiler
②錯(cuò)誤原因:High配置設(shè)置為Size,應(yīng)該為L(zhǎng)ow2、①錯(cuò)誤描述:Fatal Error[Pe1696]: cannot open source file “inc/hw_types.h” E:StellarisWareM3_9D92boardsdk-lm3s9b96boot_demo2boot_demo2.c 25②錯(cuò)誤原因:C/C++ Complier(Assember)->Preprocessor->Additional include directories: $PROJ_DIR$.$PROJ_DIR$..$PROJ_DIR$......3、①錯(cuò)誤描述:Fatal Error[Pe1696]: cannot open source file
“l(fā)wip/opt.h”
E:StellarisWareM3_9D92utilslwiplib.h 4
4②錯(cuò)誤原因:C/C++ Complier-(Assember)>Preprocessor->Additional include directories:
$PROJ_DIR$......third_partylwip-1.3.2apps
$PROJ_DIR$......third_partybget
$PROJ_DIR$......third_partylwip-1.3.2portsstellarisinclude
$PROJ_DIR$......third_partylwip-1.3.2srcinclude
$PROJ_DIR$......third_partylwip-1.3.2srcincludeipv4
$PROJ_DIR$......third_partylwip-1.3.2srcincludelwip
$PROJ_DIR$......third_party4、①錯(cuò)誤描述:Fatal Error[Pe035]: #error directive: Unrecognized COMPILER!E:StellarisWareM3_9D92boardsdk-lm3s9b96driversset_pinout.h 59
Error while running C/C++ Compiler
②錯(cuò)誤原因:C/C++ Complier-(Assember)>Preprocessor->Defined symbols: ewarm5、①錯(cuò)誤描述:Error[Pe020]: identifier “ROM_pvAESTable” is undefined E:StellarisWareM3_9D92third_partyaesaes.c 319
②錯(cuò)誤原因:
6、①錯(cuò)誤描述:Error[Li005]: no definition for “main” [referenced from cmain.o(rt7M_tl.a)]Error while running Linker
②錯(cuò)誤原因:定義函數(shù):int main(void){ return(0);}
7、①錯(cuò)誤描述:Error[Li005]: no definition for “main” [referenced from cmain.o(rt7M_tl.a)]Error while running Linker
②錯(cuò)誤原因:如果是庫(kù)是庫(kù)函數(shù),在:General Options->Output->Output file:選擇: Library項(xiàng)
4、①錯(cuò)誤描述:Fatal Error[Pe1696]: cannot open source file “uip.h” E:StellarisWareM3_9D92third_partyuip-1.0appsdhcpcdhcpc.c 37
②錯(cuò)誤原因:
5、①錯(cuò)誤描述:
②錯(cuò)誤原因:
$PROJ_DIR$......third_partylwip-1.3.2apps
$PROJ_DIR$......third_partybget
$PROJ_DIR$......third_partylwip-1.3.2portsstellarisinclude
$PROJ_DIR$......third_partylwip-1.3.2srcinclude
$PROJ_DIR$......third_partylwip-1.3.2srcincludeipv
4$PROJ_DIR$......third_party
$PROJ_DIR$......third_partyuip-1.0
$PROJ_DIR$......third_partyuip-1.0uip
$PROJ_DIR$......third_partyuip-1.0apps
$PROJ_DIR$......third_partyspeex-1.2rc1include
$PROJ_DIR$......third_partyspeex-1.2rc1includespeex
$PROJ_DIR$......third_partyspeex-1.2rc1stellaris6、①錯(cuò)誤描述:Fatal Error[Pe035]: #error directive: You now need to define either FIXED_POINT or FLOATING_POINT E:StellarisWareM3_9D92third_partyspeex-1.2rc1libspeexarch.h 65②錯(cuò)誤原因:
7、①錯(cuò)誤描述:Fatal Error[Pe035]: #error directive: “Unrecognized/undefined driver for DISK0!”
E:StellarisWareM3_9D92third_partyfatfsportdual-disk-driver.c 6
2Error while running C/C++ Compiler
②錯(cuò)誤原因:
UART_BUFFERED
DISK0_DK_LM3S9B96
DISK1_USB_MSC
INCLUDE_BGET_STATS8、①錯(cuò)誤描述:Error[Pe020]: identifier “ROM_pvAESTable” is undefined E:SWM3_9D92(6.20)third_partyaesaes.c 359
Error while running C/C++ Compiler
②錯(cuò)誤原因:
10、①錯(cuò)誤描述:Fatal Error[Pe035]: #error directive: You now need to define either FIXED_POINT or FLOATING_POINT E:SWM3_9D92(6.20)third_partyspeex-1.2rc1libspeexarch.h 6
5Error while running C/C++ Compiler
②錯(cuò)誤原因:
11、①錯(cuò)誤描述:
Error[Li005]: no definition for “ROM_SysCtlClockSet” [referenced from E:SWM3_9D92(6.20)boardsdk-lm3s9b96safertos_demoDebugObjsafertos_demo.o] Error[Li005]: no definition for “ROM_FlashUserGet” [referenced from E:SWM3_9D92(6.20)boardsdk-lm3s9b96safertos_demoDebugObjlwip_task.o]
Error[Li005]: no definition for “ROM_IntPrioritySet” [referenced from E:SWM3_9D92(6.20)boardsdk-lm3s9b96safertos_demoDebugObjlwip_task.o]
Error[Li005]: no definition for “ROM_GPIOPinTypeGPIOOutput” [referenced from E:SWM3_9D92(6.20)boardsdk-lm3s9b96safertos_demoDebugObjled_task.o]
Error[Li005]: no definition for “ROM_GPIOPinWrite” [referenced from E:SWM3_9D92(6.20)boardsdk-lm3s9b96safertos_demoDebugObjled_task.o]
Error[Lp011]: section placement failed: unable to allocate space for sections/blocks with a total estimated minimum size of 0x11e54 bytes
in
<[0x20000000-0x2000ffff]>(total uncommitted space 0x10000).Error while running Linker
②錯(cuò)誤原因:
12、①錯(cuò)誤描述:
Error[Lp011]: section placement failed: unable to allocate space for sections/blocks with a total estimated minimum size of 0x11e54 bytes in <[0x20000000-0x2000ffff]>(total uncommitted space 0x10000).Error while running Linker
第二篇:Android4.0編譯錯(cuò)誤記錄
1.make: ***
[out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1 解決方法: vim external/mesa3d/src/glsl/linker.cpp
添加:
#include
2.make: ***
[out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1 解決辦法:
vim external/llvm/llvm-host-build.mk
添加:
LOCAL_LDLIBS :=-lpthread-ldl
3.make: ***
[out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1 解決方法:
vim external/gtest/include/gtest/internal/gtest-param-util.h
添加:
#include
4.
第三篇:BUSYBOX編譯錯(cuò)誤及解決方法總結(jié)
編譯busybox的組合:
busybox-1.0.0 arm-linux-gcc-2.95.3(AT91rm9200開(kāi)發(fā)板)
經(jīng)典參考:
http://busybox.net/downloads/ 下載busybox http://husaberg.toby-churchill.com/balloon/releases/v0.7/roots/ 文件系統(tǒng)制作
移植基本過(guò)程:
1.到http://busybox.net/downloads/busybox-1.7.3.tar.bz2下載busybox;2.解壓busybox1.7.3 tar jxvf busybox-1.7.3.tar.bz2 3.make defconfig 4.make menuconfig
在[build options]中選擇[Build busybox as a static binary] 主要是C庫(kù)的連接方式,安裝目錄等。5.make 6.創(chuàng)建rootfs目錄 7.make install
編譯過(guò)程可能出現(xiàn)以下錯(cuò)誤,解決方法如下:
可能會(huì)出現(xiàn)的錯(cuò)誤:
1.出現(xiàn)如下錯(cuò)誤
CC miscutils/taskset.o miscutils/taskset.c:17: error: parse error before '*' token miscutils/taskset.c:18: warning: function declaration isn't a prototype miscutils/taskset.c: In function `__from_cpuset':
miscutils/taskset.c:22: error: `CPU_SETSIZE' undeclared(first use in this function)
miscutils/taskset.c:22: error:(Each undeclared identifier is reported only once miscutils/taskset.c:22: error: for each function it appears in.)miscutils/taskset.c:26: warning: implicit declaration of function `CPU_ISSET' miscutils/taskset.c:26: error: `mask' undeclared(first use in this function)miscutils/taskset.c: In function `taskset_main': miscutils/taskset.c:47: error: `cpu_set_t' undeclared(first use in this function)
miscutils/taskset.c:47: error: parse error before “mask” miscutils/taskset.c:68: warning: implicit declaration of function `CPU_ZERO' miscutils/taskset.c:68: error: `new_mask' undeclared(first use in this function)
miscutils/taskset.c:69: error: `CPU_SETSIZE' undeclared(first use in this function)miscutils/taskset.c:71: warning: implicit declaration of function `CPU_SET'
miscutils/taskset.c:78: error: `mask' undeclared(first use in this function)
make[1]: *** [miscutils/taskset.o] Error 1
make: *** [miscutils] Error 2
make menuconfig 找到[Miscellaneous Utilities],去掉[task set]
2.如下錯(cuò)誤:
time.c libbb/time.c:20: error: “CLOCK_MONOTONIC” undeclared(first use in this function)make menuconfig
去掉Busybox Settings->Busybox Library Tuning->[]Use clock_gettie(CLOCK_MONOTONIC)syscall
3.出現(xiàn)如下錯(cuò)誤:
In file included from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/fs.h:12,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/capability.h:17,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/binfmts.h:5,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/sched.h:9,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/net/inetpeer.h:14,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/net/route.h:28,from /busybox-1.01/networking/route.c:42: /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/wait.h:4: warning: `WNOHANG' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/waitflags.h:26: warning: this is the location of the previous definition /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/wait.h:5: warning: `WUNTRACED' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/waitflags.h:27: warning: this is the location of the previous definition In file included from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/sched.h:77,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/net/inetpeer.h:14,from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/net/route.h:28,from /busybox-1.01/networking/route.c:42: /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/time.h:108: warning: `FD_SET' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/sys/select.h:83: warning: this is the location of the previous definition /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/time.h:109: warning: `FD_CLR' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/sys/select.h:84: warning: this is the location of the previous definition /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/time.h:110: warning: `FD_ISSET' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/sys/select.h:85: warning: this is the location of the previous definition /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/time.h:111: warning: `FD_ZERO' redefined /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/sys/select.h:86: warning: this is the location of the previous definition In file included from /busybox-1.01/networking/route.c:42: /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/net/route.h:34: warning: #warning This file is not supposed to be used outside of kernel.…… ……
In file included from /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/netdb.h:38,from /busybox-1.01/include/libbb.h:36,from /busybox-1.01/include/busybox.h:54,from /busybox-1.01/networking/route.c:44: /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/siginfo.h:34: redefinition of `union sigval' /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/siginfo.h:37: warning: redefinition of `sigval_t' /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/asm/siginfo.h:11: warning: `sigval_t' previously declared here /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/siginfo.h:274: redefinition of `struct sigevent' /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/siginfo.h:289: warning: redefinition of `sigevent_t' /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/asm/siginfo.h:211: warning: `sigevent_t' previously declared here /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/siginfo.h:298: parse error before `0' In file included from /busybox-1.01/include/busybox.h:54,from /busybox-1.01/networking/route.c:44: /busybox-1.01/include/libbb.h:112: warning: declaration of `flags' shadows global declaration /busybox-1.01/include/libbb.h:113: warning: declaration of `flags' shadows global declaration /busybox-1.01/include/libbb.h:135: warning: declaration of `flags' shadows global declaration /busybox-1.01/include/libbb.h:251: warning: declaration of `flags' shadows global declaration /busybox-1.01/include/libbb.h:256: redefinition of `struct sysinfo' /busybox-1.01/include/libbb.h:272: warning: declaration of `info' shadows global declaration /busybox-1.01/include/libbb.h:309: warning: declaration of `flags' shadows global declaration /busybox-1.01/include/libbb.h:440: warning: declaration of `flags' shadows global declaration /busybox-1.01/networking/route.c:475: warning: declaration of `flags' shadows global declaration /busybox-1.01/networking/route.c: In function `set_flags': /busybox-1.01/networking/route.c:476: warning: declaration of `flags' shadows global declaration /busybox-1.01/networking/route.c: In function `displayroutes': /busybox-1.01/networking/route.c:490: warning: declaration of `flags' shadows global declaration make: *** [/busybox-1.01/networking/route.o] Error 1 去掉Busybox Settings->NetWork device-->[]route
4.如下錯(cuò)誤:
usr/src/armlinux/busybox-1.0.0/libbb/loop.c:32:linux/version.h:No such file or directory /usr/src/armlinux/busybox-1.0.0/libbb/loop.c:35 arse error /usr/src/armlinux/busybox-1.0.0/libbb/loop.c:37 arse error 將內(nèi)核源碼下的include/linux目錄下的versition.h文件
放到 busybox-1.0.0/include/linux下
.....
第四篇:Ubuntu 11.10編譯Android源碼錯(cuò)誤
Ubuntu 11.10編譯Android源碼錯(cuò)誤
問(wèn)題1:
frameworks/base/libs/utils/RefBase.cpp: 在成員函數(shù)
‘void android::RefBase::weakref_type::trackMe(bool, bool)’中:
frameworks/base/libs/utils/RefBase.cpp:483:67: 錯(cuò)誤: 將
‘constandroid::RefBase::weakref_impl’作為
‘voidandroid::RefBase::weakref_impl::trackMe(bool, bool)’的‘this’實(shí)參時(shí)丟棄了類(lèi)型限定[-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] 錯(cuò)誤 1 原因:Ubuntu 11.10的gcc 4.6版本太高了,android編譯需要gcc 4.4
解決辦法:更換gcc、g++版本4.6為4.4
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
sudo rm-rf /usr/bin/gcc /usr/bin/g++
sudo ln-s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln-s /usr/bin/g++-4.4 /usr/bin/g++
問(wèn)題2:
g++: 錯(cuò)誤: –fpermissive:沒(méi)有那個(gè)文件或目錄
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] 錯(cuò)誤 1 解決辦法:sudoapt-get install g++-4.4-multilib
經(jīng)過(guò)此操作編譯可順利進(jìn)行。
第五篇:APUE編譯錯(cuò)誤小結(jié)(寫(xiě)寫(xiě)幫整理)
linux下《UNIX環(huán)境高級(jí)編程》(apue2)源碼編譯出錯(cuò)的處理方法相信很多跟我一樣想要學(xué)習(xí)unix編程的朋友在興沖沖拿到《unix環(huán)境高級(jí)編程》后,準(zhǔn)備拿源碼練練手時(shí),執(zhí)行第一個(gè)myls就出現(xiàn)一大堆的錯(cuò)誤,這未免時(shí)個(gè)不小的打擊。今天把解決方法寫(xiě)下來(lái),第一自己有個(gè)記錄,第二也幫助那些被同樣問(wèn)題困擾的朋友盡快的進(jìn)入linux美麗的世界。(只限linux系統(tǒng))
首先需要make一次源代碼
編輯源碼解壓生成的apue.2e文件夾下的Make.defines.linux 修改WKDIR=/home/var/apue.2e為你的apue.2e目錄,比如我的apue源碼解壓在/home/lc,那我就改為:
WKDIR=/home/lc/apue.2e 然后進(jìn)入apue.2e/std 目錄,編輯linux.mk。修改里面所有的nawk為awk。最后返回apue.2e目錄,執(zhí)行make命令: 在我的機(jī)器上編譯時(shí),提示ARG_MAX未定義,可以這么修改。在apue.2e/include/apue.h中添加一行:
#define ARG_MAX 4096 打開(kāi)apue.2e/threadtl/getenv1.c 和apue.2e/threadctl/getenv3.c,添加一行: #include “apue.h” 這樣就可以編譯通過(guò)了,復(fù)制apue.2e/include/apue.h到/usr/include下,apue.2e/lib/libapue.a 到/usr/lib/和 /usr/lib64下。
以下是編譯源碼時(shí)的錯(cuò)誤提示跟解決方法(假定你的工作目錄跟我的一樣,為/usr/local/apue.2e)錯(cuò)誤提示1:
myls.c:1:19: apue.h: No such file or directory myls.c: In function `main': myls.c:13: error: `NULL' undeclared(first use in this function)myls.c:13: error:(Each undeclared identifier is reported only once myls.c:13: error: for each function it appears in.)解決辦法:
拷貝apue.h到系統(tǒng)默認(rèn)頭文件目錄中
$cp /usr/local/apue.2e/include/apue.h /usr/include 錯(cuò)誤提示2:
/tmp/ccBBopm0.o(.text+0x2b): In function `main': : undefined reference to `err_quit' /tmp/ccBBopm0.o(.text+0x5f): In function `main': : undefined reference to `err_sys' collect2: ld returned 1 exit status 解決辦法:
err_quit跟err_sys是作者自己定義的錯(cuò)誤處理函數(shù),需要單獨(dú)定義頭文件 在/usr/include 下新建一個(gè)名為myerr.h的文件
拷貝下邊的內(nèi)容到myerr.h(其實(shí)此頭文件在原書(shū)的附錄B中)#include “apue.h” #include
va_list ap;
va_start(ap, fmt);
err_doit(1, errno, fmt, ap);
va_end(ap);} /* * Fatal error related to a system call.* Print a message and terminate.*/ void err_sys(const char *fmt,...){
va_list ap;
va_start(ap, fmt);
err_doit(1, errno, fmt, ap);
va_end(ap);
exit(1);} /* * Fatal error unrelated to a system call.* Error code passed as explict parameter.* Print a message and terminate.*/ void err_exit(int error, const char *fmt,...){
va_list ap;
va_start(ap, fmt);
err_doit(1, error, fmt, ap);
va_end(ap);
exit(1);} /* * Fatal error related to a system call.* Print a message, dump core, and terminate.*/ void err_dump(const char *fmt,...){
va_list ap;
va_start(ap, fmt);
err_doit(1, errno, fmt, ap);
va_end(ap);
abort();/* dump core and terminate */
exit(1);/* shouldn't get here */ } /* * Nonfatal error unrelated to a system call.* Print a message and return.*/ void err_msg(const char *fmt,...){
va_list ap;
va_start(ap, fmt);
err_doit(0, 0, fmt, ap);
va_end(ap);} /* * Fatal error unrelated to a system call.* Print a message and terminate.*/ void err_quit(const char *fmt,...){
va_list ap;
va_start(ap, fmt);
err_doit(0, 0, fmt, ap);
va_end(ap);
exit(1);} /* * Print a message and return to caller.* Caller specifies “errnoflag”.*/ static void err_doit(int errnoflag, int error, const char *fmt, va_list ap){
char buf[MAXLINE];vsnprintf(buf, MAXLINE, fmt, ap);if(errnoflag)
snprintf(buf+strlen(buf), MAXLINE-strlen(buf), “: %s”,strerror(error));strcat(buf, “ ”);fflush(stdout);/* in case stdout and stderr are the same */ fputs(buf, stderr);fflush(NULL);/* flushes all stdio output streams */ } 然后在你需要使用這幾種錯(cuò)誤處理函數(shù)的程序源代碼里加入: #include “myerr.h”
至此,APUE就可以順利編譯啦