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

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

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

問題描述

限時送ChatGPT賬號..

我有 Eclipse Platform 3.7.2 和 CDT 8.0.2.

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

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

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

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

感謝您對此的任何想法.

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

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

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

解決方案

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

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

Krzysztof Czaińsk 的所有作品

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

<塊引用>

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

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

<小時>

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

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 沒有在頭文件更改時構(gòu)建項目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 中制作水平滑動日歷?)
How to save and retrieve Date in SharedPreferences(如何在 SharedPreferences 中保存和檢索日期)
Open WebSocket connection with authentication cookie(使用身份驗證 cookie 打開 WebSocket 連接)
jax-ws change Content-type to Content-Type because server is hyper sensitive(jax-ws 將 Content-type 更改為 Content-Type 因為服務(wù)器是超敏感的)
Eclipse C++ including header file from my source folder(Eclipse C++ 包括來自我的源文件夾的頭文件)
Multiple editable rows in JTable header(JTable 標題中的多個可編輯行)
主站蜘蛛池模板: 日本久久精品视频 | 在线观看视频一区二区三区 | 7777在线视频 | 色网站在线 | 久久久新视频 | 成人在线免费观看视频 | 99在线免费观看视频 | 免费艹逼视频 | 欧美美女二区 | 麻豆一区二区三区精品视频 | 成人高清视频在线观看 | www.久草.com| 午夜在线视频一区二区三区 | 国产高清在线精品 | 中文字幕一区二区三区四区 | 亚洲国产精品一区 | 久久性av | 亚洲综合第一页 | 亚洲国产aⅴ精品一区二区 免费观看av | 国产中文字幕网 | 一区二区片 | 亚洲精品无 | 青青久久久 | 日韩在线播放网址 | 国产日产久久高清欧美一区 | 国产午夜精品一区二区三区四区 | 午夜电影在线播放 | 午夜精品久久久 | 亚洲精品大片 | 日韩aⅴ片 | 久久久久国产一区二区三区四区 | 欧美亚洲综合久久 | 无人区国产成人久久三区 | 精品国产一区二区三区日日嗨 | 涩涩视频在线观看免费 | 日韩图区 | 91看片网| 日本不卡免费新一二三区 | aaaa网站 | 日韩精品成人在线 | 中文字幕视频在线看 |