Android+NDK+CDT+eclipse+OPenGL ES的編譯與native調試 解決no debugging symbols found

來源:互聯網
上載者:User

標籤:android   style   http   io   color   ar   os   使用   for   

環境:

NDK版本r8,eclipse和Android使用的是adt-bundle-windows-x86打包版本比較方便,


作業系統為windows8.1

一、NDK的編譯

1、源碼

NDK的examples目錄有Hello-GL2的源碼,大家可以先使用它。

2、將樣本工程匯入到eclipse中

3、編譯設定

a、選中工程,eclipse中菜單windows->prefereces-》android-》NDK

設定NDK的路徑

b、選中工程,eclipse中菜單project->properties 

單擊builder,  CDT Builder選中

單擊c/c++Bulder,Builder setting 中,build command重新設定為ndk-build NDK_DEBUG=1 V=1(NDK_DEBUG=1 V=1主要為後面的native調試作準備)

c、run 工程即可



二、native 調試

1、建立模擬器

模擬器版本不要太高,我的版本是android2.3.3,否則會出現no debug symbol found的錯誤


2、選中工程,右鍵快顯功能表,單擊native support

3、選中工程,右鍵快顯功能表,單擊 Run as android applicaton,先將程式裝上

4、選中工程,右鍵快顯功能表,單擊 debug as native applicaton


4、就可以在調試c++代碼了

注意點:

1、真實機器可能會出現no debug symbol found的錯誤

2、模擬器版本太高也會出現no debug symbol found的錯誤

3、將下載的的其他版本的sdk放在\sdk\platforms中

4、需要先run as android application先將app裝上

錯誤類型:

由於android版本太高出現的error類型

1、no debugging symbols found

2、No symbol table is loaded. Use the "file" command

3、Error accessing memory address 0x1a66: Input/output error 等等




Android+NDK+CDT+eclipse+OPenGL ES的編譯與native調試 解決no debugging symbols found

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.