1. 程式人生 > >編譯錯誤:undefined reference to `__umoddi3'的處理

編譯錯誤:undefined reference to `__umoddi3'的處理

用gcc 4.3編譯kernel 2.6.22,結果出現:
undefined reference to `__umoddi3'
這樣的錯誤。查google是gcc 4.3太新的問題,在更新的kernel應該沒有這個問題,解決的辦法如下:
cd kernel
vi Makefile
找到:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs /
                   -fno-strict-aliasing -fno-common /
                   -Werror-implicit-function-declaration

增加一行,修改成:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs /
                   -fno-strict-aliasing -fno-common /
                   -Werror-implicit-function-declaration /
                   -fno-tree-scev-cprop


相關推薦

編譯錯誤undefined reference to `__umoddi3'的處理

用gcc 4.3編譯kernel 2.6.22,結果出現:undefined reference to `__umoddi3'這樣的錯誤。查google是gcc 4.3太新的問題,在更新的kernel應該沒有這個問題,解決的辦法如下:cd kernelvi Makefile找

ubuntu 下 make 編譯錯誤undefined reference to cv::line

在編譯一個專案時候出現 “undefined reference to cv::line” 的錯誤,是在連結其中一個靜態庫的時候出現的錯誤,錯誤如下: /home/build/lib/libapriltags.a(TagDetection.cc.o): In function `AprilTag

Qt 編譯出錯undefined reference to vtable XXX

  在Qt編譯的過程中,程序會出現 error: undefined reference to `vtable for 類名'的問題,對於不經常使用QT的人來說甚是頭疼,其實這類問題發生的主要原因在於,一般我們定義了一個類以後,如果他是繼承了其他類的話 就比如說我們

Windows編譯OpenCV4Android解決undefined reference to std錯誤

OpenCV4Android支援三種使用方式 1.Java層呼叫 2.NDK呼叫動態庫(方便,但是會包含整個.so庫) 3.NDK呼叫靜態庫(靈活,比如沒有用到機器學習模組,libopencv_ml.a裡的程式碼是不會打包到動態庫裡的) 通過連結靜態庫的方式使用

linux下生產者與消費者問題程式碼,以及編譯c程式碼時errorundefined reference to sem_wait 解決方法之一

//本文的詳細講解內容請大家下載word文件:http://download.csdn.net/detail/chenqiai0/4611801 #include <stdio.h> #include <pthread.h>//執行緒 #includ

gcc編譯執行緒程式需帶-lpthread選項(否則出錯undefined reference to `pthread_create')

程式中兩處使用了pthread_create函式,包含了標頭檔案#include <pthread.h>。 gcc xxx.c -o xxx 編譯時出現以下錯誤: 分析: 用gcc編譯使用了POSIX thread的程式時通常需要加額外的選項,以連結到庫。 此

xcode工程編譯錯誤No architectures to compile for

bis clear 文檔 哪些 i386 提高 href nts b2c 問題 開發環境:xcode6,iPhone6模擬器 xcode工程編譯錯誤:No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active

caffe日常坑系列之undefined reference to symbol '_ZN2cv6String10deallocateEv'

iss ren and tor ssi symbols str mis locate 在使用caffe庫編譯C++時出現的 解決如下: /usr/bin/ld: /tmp/ccA5JGRP.o: undefined reference to symbol ‘_ZN2cv

minigui:解決gvfb編譯報錯undefined reference to symbol 'XkbGetIndicatorState'

minigui在linux PC平臺建立開發環境時,需要Virtual Frame Buffer 支援(gvfb,qvfb),minigui官網提供了這兩個程式的原始碼,需要自己下載編譯並安裝到自己的PC上。 我用的是gvfb,minigui下載地址:http://www.minig

「caffe編譯bug」 undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11

CXX/LD -o .build_release/tools/test_net.binCXX/LD -o .build_release/tools/convert_annoset.binCXX/LD -o .build_release/tools/device_query.binCXX/LD -o .buil

Clion lua 編譯報錯: undefined reference to `lual_newstate' 在win10上面編譯lua5.3.5以及解決方法

在CmakeLists.txt裡面新增:  ``` include_directories("D:\\lua\\lua-5.3.5\\lua-5.3.5\\dist\\include") link_directories("D:\\lua\\lua-5.3.5\\lua-5.3.5

opencv error undefined reference to `
Linux 編譯報錯 -- undefined reference to 問題解決方法 (具體'pthread_create'和opencv看文章最後兩條)

最近在Linux下程式設計發現一個詭異的現象,就是在連結一個靜態庫的時候總是報錯,類似下面這樣的錯誤: (.text+0x13): undefined reference to `func'     關於undefined reference這樣的問題,大家其實經常會遇到

Linux 編譯報錯 undefined reference to `pthread_create'

在編譯Linux下多執行緒程式的時候出現錯誤資訊, 寫好程式碼,進行編譯時,出現如下錯誤提示資訊:  thread.c:(.text+0xae): undefined reference to `pthread_create' thread.c:(.

link錯誤 qt undefined reference to

undefined reference to '_imp__ZN8QDomNodeD2Ev' undefined reference to '_imp__ZN8QDomNodeD2Ev' in qdom.h 477 是怎麼回事?在linux下運的好好的,轉到windows下

C與C++混合程式設計問題.C++呼叫.C檔案時出現undefined reference to `xxxxx()'

本人使用qt的介面和opengl功能模擬演算法,該演算法需要在嵌入式中執行,因此需要用純C編寫,此時涉及到在C++寫的qt介面檔案中呼叫C檔案的庫函式,原先以為只需在C++中把C的.h檔案包含進去就可以正常使用,後來發現,使用這種方法時,在程式碼編寫時,C++檔案裡可以直接連

解決使用NDK進行編譯時出現undefined reference to function的問題

之前在編譯jni時出現了undefined reference to function這個問題,查閱相關資料說是可能連結的庫問題,然後通過各種gcc調整順序解決了這個問題。這個工程是導師的工程,工程在Linux環境下執行無誤,我從Linux環境往Android

關於 inline 函式的分析 *** undefined reference to ***

如果將函式的實現放在標頭檔案中,那麼每一個包含該標頭檔案的cpp檔案都將得到一份關於該函式的定義,那麼連結器會報函式重定義錯誤。 如果將函式的實現放在標頭檔案,並且標記為 inline 那麼每一個包含該標頭檔案的cpp檔案都將得到一份關於該函式的定義,並且連結

Linux 編譯報錯 -- undefined reference to 問題解決方法 (具體'pthread_create'和opencv看文章最後兩條)

最近在Linux下程式設計發現一個詭異的現象,就是在連結一個靜態庫的時候總是報錯,類似下面這樣的錯誤: (.text+0x13): undefined reference to `func'     關於undefined reference這樣的問題,大家其實經常會遇

執行緒編譯問題(undefined reference to `pthread_create')

#include <stdio.h> #include <pthread.h> #include <stdlib.h> void printids(const char *s) { pid_t pid;