導航:首頁 > 源碼編譯 > 編譯a文件lto錯誤

編譯a文件lto錯誤

發布時間:2022-10-20 07:28:59

① 【新手】為什麼又是編譯錯誤會冒出algo.h如圖

你寫的程序調用了STL庫函數中的函數
algo.h就是STL庫函數的一個文件

因為你程序調用的可能不正確,所以你點擊錯誤的時候,就會導向到函數定義的地方了
它到這里是表示你調用了該函數然後運行的時候到這個位置出錯了
這個一般情況是你調用的時候可能傳入的參數有問題,如為null或者非法什麼的等等

所以你要檢查你的程序的正確性

② centos7編譯php5.4.38時出錯

1. centos7信息

uname -a

linux dev 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2. 運行 ./configure 報錯

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
3. 運行 grep error config.log

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.

4. 按照網上說的方法 在configure後面加上了 --host=x86_64 ,報錯
configure: error: in `/usr/local/src/php-5.6.19':
configure: error: C preprocessor "/lib/cpp" fails sanity check
5. config.log中錯誤提示,差好幾個頭文件

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.
[root@dev php-5.6.19]# grep error config.log
cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=extc89'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=ansi'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-std'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-Xc'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
configure:4478: error: in `/usr/local/src/php-5.6.19':
configure:4480: error: C preprocessor "/lib/cpp" fails sanity check

6. gcc安裝信息

[root@dev php-5.6.19]# rpm -qa | grep glibc
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-utils-2.17-106.el7_2.4.x86_64
glibc-common-2.17-106.el7_2.4.x86_64
glibc-devel-2.17-106.el7_2.4.x86_64
glibc-static-2.17-106.el7_2.4.x86_64
glibc-2.17-106.el7_2.4.x86_64
glibc-headers-2.17-106.el7_2.4.x86_64
compat-glibc-2.12-4.el7.centos.x86_64

[root@dev php-5.6.19]# gcc -v
Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)

③ c語言問題 編譯顯示0錯誤而運行顯示錯誤

我之前用的vs2012,現在用的vs2013。這個是問題一般是編碼格式的問題的。可以調成unicode試試。或者用記事本過濾一下。

④ .a文件是什麼VC6.0編譯出現錯誤,怎麼在編譯的時候把.a文件也加進去

.a文件是GCC編譯器用的,VC編譯器無法使用。
你要換GCC編譯器的話集成開發環境也不能用VC,要換。
Windows下也是可以用GCC的,不過你要確定你拿到的.a不是Linux下生成的
然後這裡面名堂就多了我一下子也講不清於是只能讓你自己慢慢去找這方面的資料了。

⑤ mariadb編譯安裝出現如下錯誤,要怎麼弄

project(TokuDB)
suppress -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for

link-time optimizations to work properly.

From https://gcc.gnu.org/gcc-4.9/changes.html:

When using a linker plugin, compiling with the -flto option now

generates slim objects files (.o) which only contain intermediate

language representation for LTO. Use -ffat-lto-objects to create

files which contain additionally the object code. To generate

static libraries suitable for LTO processing, use gcc-ar and

gcc-ranlib; to list symbols from a slim object file use

gcc-nm. (Requires that ar, ranlib and nm have been compiled with

plugin support.)

不是4.9.0以上不行,因為tokudb的問題,一般4.8是支持的C++11的,只是不同版本GCC支持C++11特性不同而已

⑥ 用g++編譯程序生成名為a的應用程序,使用./a.out不輸出,錯誤顯示".不是

我用一個例子來告訴你怎麼樣在 C++ 里使用C的頭文件/函數。

比方說我有一個C的頭文件叫 c.h, C的源碼文件叫 c.c,內容分別是

c.h:
#ifndef _ASDFD_INCLUDED_
#define _ASDFD_INCLUDED_

#include <stdio.h>

extern int test(int a);

#endif

c.c:
#include "c.h"

int test(int a)
{
printf("A = %d\n", a);
return a*a;
}

⑦ quartus編譯出現如下錯誤

說的不明確,應該是程序有問題

⑧ C# 編譯,生成,運行都出錯。錯誤說明:Files的值"a

一般是編譯文件里有不可識別的字元串導致的。
關閉 VS,打開有問題的項目(圖上看是 AcsCtrUntil 和 WebApi 兩個)所在目錄,把 obj 和 bin 兩個文件夾都刪掉,再重新打開項目編譯看看。

⑨ IAR編譯錯誤,請高手給看看是怎麼回事

這是說明你的代碼量超出了你預設的rom大小,一般iar編譯程序後會根據一個
xxx.xcl文件把你的代碼和數據鏈接到指定地址,iar的文件夾裡面搜搜就能搜到,"-z(code)code=romstart-romend"是說你所有的代碼都放置在以romstart為起始地址,romend為終止地址的一段連續的空間內,romstart為0x4000016c,romend為40003fff,貌似是個有16k
flash的arm。上面報錯是因為你編譯出來的code
size
是0x58b4,已經超過了這個空間,你能做的就是看看能不能縮減代碼量。

⑩ 用命令行編譯Java時遇到如下錯誤提示(該錯誤是在Class文件生成後,執行java命令時出現的)

你的java命令是怎麼寫的?
一般是:java + class文件名;例如:A.java 編譯後生成A.class文件。則命令為:java A
如果這樣都不行,可能是你所運行的class文件不在你現在所訪問的路徑下。應該在cmd環境下進入.class所在的文件目錄下,然後運行 java A

閱讀全文

與編譯a文件lto錯誤相關的資料

熱點內容
自己購買雲主伺服器推薦 瀏覽:422
個人所得稅java 瀏覽:761
多餘的伺服器滑道還有什麼用 瀏覽:191
pdf劈開合並 瀏覽:28
不能修改的pdf 瀏覽:752
同城公眾源碼 瀏覽:489
一個伺服器2個埠怎麼映射 瀏覽:298
java字元串ascii碼 瀏覽:79
台灣雲伺服器怎麼租伺服器 瀏覽:475
旅遊手機網站源碼 瀏覽:332
android關聯表 瀏覽:945
安卓導航無聲音怎麼維修 瀏覽:332
app怎麼裝視頻 瀏覽:430
安卓系統下的軟體怎麼移到桌面 瀏覽:96
windows拷貝到linux 瀏覽:772
mdr軟體解壓和別人不一樣 瀏覽:904
單片機串列通信有什麼好處 瀏覽:340
游戲開發程序員書籍 瀏覽:860
pdf中圖片修改 瀏覽:288
匯編編譯後 瀏覽:491