1. 程式人生 > >解決Ubuntu編譯error:fatal error: sys/cdefs.h: No such file or directory

解決Ubuntu編譯error:fatal error: sys/cdefs.h: No such file or directory

64位的Ubuntu如果執行X86平臺32位編譯,gcc -m32 -o x  x.c會報錯:fatal error: sys/cdefs.h: No such file or directory

解決辦法:可以執行sudo apt-get install libc6-dev-i386語句聯網安裝32位庫檔案。

64位下直接編譯會出現指標佔8個位元組的情況,不利於直接操作堆疊地址,如下圖:

安裝好庫檔案後,執行-m32 ,指標佔記憶體如圖:

相關推薦

解決Ubuntu編譯errorfatal error: sys/cdefs.h: No such file or directory

64位的Ubuntu如果執行X86平臺32位編譯,gcc -m32 -o x  x.c會報錯:fatal error: sys/cdefs.h: No such file or directory 解

解決fatal error: sys/system_properties.h: No such file or directory compilation terminated.

編譯的異常log: system/core/include/cutils/properties.h:22:35: fatal error: sys/system_properties.h: No such file or directory compilation term

mingw中編譯庫出現sys/times.h: No such file or directory的可行解決方法

在mingw中成功編譯好了boost庫後, 使用別人寫的機器學習庫BMRM(https://github.com/funkey/bmrm) 編譯模型時出現了fatal error: sys/times.h:No such file or directory的錯誤, 一看,就

編譯錯誤 無法開啟包括檔案:“SDKDDKVer.h”: No such file or directory

本機安裝了兩個版本的VS就可能會出現這個編譯錯誤, 比如我機器上同時裝了VS2012和VS2008. VS2012中關於Windows SDK的路徑巨集定義和VS2008不同,而在某種情況下VS2008的配置串擾到了VS2012. VS2012繼承了VS2008的Inclu

編譯u-boot 報錯 openssl/evp.h: No such file or directory

在陸佳華《嵌入式系統軟硬體協同設計實戰指南 第2版》一書的第13章節 編譯U-boot時會遇到2個錯誤。原因很簡單,就從一開始的錯誤提示著手: fatal error: openssl/evp.h: 沒有那個檔案或目錄。當然在網上也可以搜尋到相關的解決方法。在此僅作為記錄

cocos2d-x 移植到android中編譯的一些問題fatal error: Box2D/Box2D.h: No such file or directory"

cocos2 app nal get dsc err 2dx ros blue 1、fatal error: Box2D/Box2D.h: No such file or directory" 須要加入box2d庫的支持,改動android.mk

解決 Boost安裝fatal error: bzlib.h: No such file or directory 問題

++ gpo sku fat .cpp post src lib thread 參考: How to install all the boost development libraries? 解決 Boost安裝:fatal error: bzlib.h: No such

Ubuntufatal error: Python.h: No such file or directory 解決方法

error ID apt overflow AC python3 TE cto fat 參考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such f

linux Ubuntu C++fatal error: iostream.h: No such file or directory

所以,新的標準是:#include <iostream>  //標準輸入輸出流 using namespace std; (因為iostream宣告在std中,故而要加上這句,除非你不用庫函式,否則錯誤); 很多編譯器都同時支援這兩種標頭檔案形式,更好的當然是標準標頭檔案。至於為什麼不廢除非標準

tesseract的編譯安裝 tesseract編譯錯誤fatal error: allheaders.h: No such file or directory

    需要安裝: <span style="font-family:'Microsoft YaHei';font-size:14px;">apt-get install autoconfapt-get install automakeapt-get install li

記錄下解決fatal error: sqlite3.h: No such file or directory

 編譯sqlite3資料庫c語言程式時出現fatal error: sqlite3.h: No such file or directory,找不到標頭檔案的問題。原來是系統沒有安裝函式庫。 執行下面語句解決: sudo apt-get install libsqlit

fatal error: Python.h: No such file or directory 解決

parrot python error pycrypto python.h [常見錯誤] fatal error: Python.h: No such file or directory環境場景系統: Parrot Linux軟件: 系統python默認版本2.7 PyCharm默認版本P

ubuntu 安裝 regex模塊時 fatal error: Python.h: No such file or directory

rec err log 模塊 python.h sudo ins 根據 post 原因是 python-dev包沒有安裝 根據Py2還是py3 sudo apt-get install python-dev 或者 sudo apt-get install python3-d

c++ include包含工程目錄下的.h檔案,報錯fatal error C1083: 無法開啟包括檔案:“Sales_item.h”: No such file or directory

背景:刷c++primer的題目,將下載的某個標頭檔案拖拽到自己建立的工程目錄下,在自己新建的原始檔中include包含時,報無法開啟檔案 明明有檔案 為什麼說無法開啟呢 於是到本地的工程目錄中開啟一看,果然沒有這個檔案 說明通過滑鼠拖拽檔案進入到工程樹上面,檔案並沒

解決Ubuntu16.04 fatal error: json/json.h: No such file or directory

參考部落格 錯誤產生 安裝json-c庫之後,根據GitHub上面的readme檔案連結到json-c庫時出現以下錯誤: SDMBNJson.h:9:23: fatal error: json/json.h: No such file or directory #include <js

caffe編譯:fatal error: pyconfig.h: No such file or directory #include "pyconfig.h編譯protobuf

sudo make clean sudo make all -j8 報錯 CXX tools/caffe.cpp In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,

解決fatal error: Python.h: No such file or directory

在ubuntu14.04 下安裝python的 netifaces包時遇到fatal error: Python.h: No such file or directory問題 首先檢視/user/include/python2.x目錄,是否包含Python.h,如果有的話可能是pyth

fatal error C1083 Cannot open include file 'iostream.h' No such file or directory解決方法

VC++6.0 中的一段程式,有用到iostream.h中的標準輸入輸出流,直接用 VS2005編譯器編譯的時候報錯“Cannot open include file: 'iostream.h': No such file or directory”。 舊的原始檔如下:

解決fatal error C1083: 無法開啟包括檔案:“opencv2/core/cvdef.h”: No such file or directory問題

無法開啟可能是因為標頭檔案路徑配置問題的原因。程式碼可能是你複製貼上的。比如#include "opencv2/core/cvdef.h"。是在人家的opencv2目錄下,而你的並不是。把路徑改過來就可以了。首先 在我的電腦裡找這個檔案在哪裡 找到了就複製地址。

配置caffe的python環境時make pycaffe提示fatal error: numpy/arrayobject.h No such file or directory解決方法

重灌numpy: sudo pip uninstall numpy sudo pip install numpy 是沒有用的。。。 解決的辦法就是: sudo apt-get install python-numpy (adsbygoogle = window.adsbygoogl