顯示具有 Code::Blocks 標籤的文章。 顯示所有文章
顯示具有 Code::Blocks 標籤的文章。 顯示所有文章

2013年4月29日 星期一

Code:Blocks LDFLAGS 參數加入方法



//******************************以下為原文翻譯轉貼*****************************
Linux下使用pthread 相關函數時,如果是使用makefile,需要LDFLAGS=-lpthread

但是使用code::blocks默認使用的makefile是沒有這個選項的,所以在編​​譯時會報錯,undefined reference to pthread_create:

需要配置這個編譯參數:

右擊工程或選擇project菜單-->project build option-->Linker settings-->other linker options
加入需要增加的參數:-pthread

再次編譯通過!
//******************************以上為原文翻譯轉貼*****************************
來源:http://www.linuxidc.com/Linux/2011-07/38568.htm

個人建立新的專案於Code::Blocks這個類似VC++的IDE,
也需要將Makefile的參數都轉到專案的設定,若完全使用原本的Makefile方式編譯,
那根本就沒有使用這IDE的意義了。
(無法使用IDE規劃的Debug&Release 的build option.
那乾脆回去效法前輩,在windows使用UltraEdit再拿回來用make編譯- -d。)

過程中也遇到LDFLAGS參數不知道怎麼加入LDFLAGS 參數,
終於給我爬到類似的文章,linux教學總得爬文比較久,一堆不相干的文章
附上設定圖:
Code::Blocks 10.05

2013年4月26日 星期五

The System is running in low-graphics mode with Ubuntu 12.04.

window 7 使用virtual box 安裝ubuntu 12.04  
1. 啟動時low graphic mode。

問題已解決。跟ATI顯卡有關。以下是解決方案:
當出現低畫質警告的畫面時(low graphic mode),
同時按下ctrl+alt+F1,進入指令界面,然後輸入:
sudo apt-get install fglrx
sudo reboot 
安裝大約15分鐘 (看網路速度) ,
結束後重啟即恢復正常。

來源地址:http://askubuntu.com/questions/141606/how-to-fix-the-system-is-running-in-low-graphics-mode-error
八樓是提到ATI顯卡問題部分