久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Eclipse CDT 沒有在頭文件更改時(shí)構(gòu)建項(xiàng)目

Eclipse CDT not building project on header file change(Eclipse CDT 沒有在頭文件更改時(shí)構(gòu)建項(xiàng)目)
本文介紹了Eclipse CDT 沒有在頭文件更改時(shí)構(gòu)建項(xiàng)目的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時(shí)送ChatGPT賬號(hào)..

我有 Eclipse Platform 3.7.2 和 CDT 8.0.2.

當(dāng)我想做全部構(gòu)建"時(shí),來自其他工作區(qū)項(xiàng)目的標(biāo)頭不計(jì)為依賴項(xiàng),并且不會(huì)重新構(gòu)建任何內(nèi)容.

我有一個(gè) hello world 應(yīng)用程序和一個(gè)靜態(tài)庫項(xiàng)目.靜態(tài)庫在項(xiàng)目屬性 -> c/c++ 常規(guī) -> 路徑和符號(hào) -> 引用選項(xiàng)卡 -> 選中活動(dòng)"中設(shè)置為參考.這是我唯一更改的設(shè)置.

順便說一句,為什么 Eclipse 在項(xiàng)目屬性下有一個(gè)額外的項(xiàng)目引用"頂級(jí)項(xiàng),這完全讓我感到驚訝.

無論如何,我嘗試了外部構(gòu)建器(在項(xiàng)目創(chuàng)建時(shí)默認(rèn)選擇)和內(nèi)部構(gòu)建器,還結(jié)合了全局設(shè)置首選項(xiàng) -> c++ -> 構(gòu)建 -> 僅在存在時(shí)構(gòu)建配置"Eclipse 資源變化......'

感謝您對此的任何想法.

更新:這是構(gòu)建依賴項(xiàng)目 Proj2 時(shí)的控制臺(tái)輸出(Proj1 是 lib).'make all' 被調(diào)用,但它只是重新鏈接,它不會(huì)重新編譯 Main.cpp.有熟悉 eclipse 生成的 makefile 的人嗎?再次感謝.

**** 為項(xiàng)目 Proj2 構(gòu)建配置調(diào)試 ****做所有構(gòu)建目標(biāo):Proj2調(diào)用:Cross G++ Linkerg++ -L"/home/user/.eclipse-workspace/Proj1/Debug" -o "Proj2" ./Main.o -lProj1完成的建筑目標(biāo):Proj2****構(gòu)建完成****

這已經(jīng)有 1.5 年的歷史了,想補(bǔ)充一下,已經(jīng)為此提交了一個(gè) Eclipse 錯(cuò)誤:https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800

解決方案

這個(gè)問題存在一個(gè)bug:https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800

還有一個(gè)可行且簡潔的解決方法(原始請求者已經(jīng)知道這一點(diǎn)).所以我只是交叉鏈接到實(shí)際答案:) https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800#c11

Krzysztof Czaińsk 的所有作品

在您的項(xiàng)目 c 或 c++ 編譯器設(shè)置中,在標(biāo)志之后添加 -MT ${OUTPUT_PREFIX}${OUTPUT}:

<塊引用>

${COMMAND} ${FLAGS} -MT ${OUTPUT_PREFIX}${OUTPUT} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}

這將創(chuàng)建正確的 .d 文件

<小時(shí)>

補(bǔ)充:解決方法有一個(gè)副作用.在一個(gè)干凈的 make all 之后總是運(yùn)行兩次,然后才說什么都不做.仍然比更改后不編譯要好;-)

I have Eclipse Platform 3.7.2 and CDT 8.0.2.

When I want to do 'Build All' headers from other workspace projects are not counted as dependencies, and nothing is rebuilt.

I have a hello world application and a static library project. The static library is set as a reference in Project Properties -> c/c++ general -> Paths and SYmbols -> References tab -> checked 'Active'. That's the only setting I changed.

By the way, It totally beats me why Eclipse has an additional "Project References" top-level item under Project Properties.

Anyway, I tried both the External Builder (which gets selected by default on project creation) and the INternal Builder, also coupled with combinations of the global setting 'Preferences -> c++ -> Build -> Build configurations only when there are Eclipse resource changes........'

Thanks for any thoughts on this.

Update: This is the console output when building dependent project Proj2 (Proj1 is the lib). 'make all' is called but it merely re-links, it doesn't recompile Main.cpp as it should. Anyone out there familiar with eclipse-generated makefiles? Thanks again.

**** Build of configuration Debug for project Proj2 ****

make all 
Building target: Proj2
Invoking: Cross G++ Linker
g++ -L"/home/user/.eclipse-workspace/Proj1/Debug" -o "Proj2"  ./Main.o   -lProj1
Finished building target: Proj2


**** Build Finished ****

Edit: This is 1.5 years old already, wanted to add that an Eclipse bug had been filed for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800

解決方案

there exists a bug for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800

And a working and neat workaround (The orignal requester knows this already). So I just crosslink to the actual answer :) https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800#c11

All credits to Krzysztof Czaińsk

In your project c or c++ compiler settings add -MT ${OUTPUT_PREFIX}${OUTPUT} after the flags:

${COMMAND} ${FLAGS} -MT ${OUTPUT_PREFIX}${OUTPUT} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}

This will create the correct .d-files


Addition: The workaround has one side-effect. After a clean make all always runs twice before it says nothing to do. Still better than not compiling after a change ;-)

這篇關(guān)于Eclipse CDT 沒有在頭文件更改時(shí)構(gòu)建項(xiàng)目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How can I make a horizontal sliding calendar in android eclipse?(如何在 android eclipse 中制作水平滑動(dòng)日歷?)
How to save and retrieve Date in SharedPreferences(如何在 SharedPreferences 中保存和檢索日期)
Open WebSocket connection with authentication cookie(使用身份驗(yàn)證 cookie 打開 WebSocket 連接)
jax-ws change Content-type to Content-Type because server is hyper sensitive(jax-ws 將 Content-type 更改為 Content-Type 因?yàn)榉?wù)器是超敏感的)
Eclipse C++ including header file from my source folder(Eclipse C++ 包括來自我的源文件夾的頭文件)
Multiple editable rows in JTable header(JTable 標(biāo)題中的多個(gè)可編輯行)
主站蜘蛛池模板: 免费在线观看一区二区 | 精品中文在线 | 日本一区二区三区在线观看 | 97精品国产97久久久久久免费 | 国产成人精品一区二区三区四区 | 国产伦精品一区二区三区四区视频 | 亚洲综合伊人 | 午夜影院在线观看 | 午夜影院在线播放 | 色综久久 | 欧美一级淫片免费视频黄 | 欧美亚洲另类在线 | 国产成人精品久久久 | 国产精品99久久久久久动医院 | 91精品国产综合久久久久久蜜臀 | 亚洲福利视频一区二区 | 羞羞视频网站免费看 | 精品欧美乱码久久久久久 | 日韩精品1区2区3区 国产精品国产成人国产三级 | 国产精品久久久久久238 | 成人精品鲁一区一区二区 | 一级黄色av电影 | 国产69精品久久99不卡免费版 | 国产美女久久 | 欧美黑人国产人伦爽爽爽 | 国产精品久久久久久久久久免费看 | 一区二区视频在线观看 | 欧美一级三级 | 狠狠色综合欧美激情 | 欧美一区二区成人 | 一区二区三区久久久 | 中文字幕成人av | 99久久精品一区二区毛片吞精 | 久久亚洲视频网 | 韩日视频在线观看 | 久久精品免费 | 成人在线电影网站 | 午夜一区二区三区在线观看 | 日韩高清国产一区在线 | 青青草亚洲 | 理论片87福利理论电影 |