Code::Blocksを使ã£ãŸè‡ªä½œODEプログラムã®ãƒ“ルド法 (Linux)

2008-07-27
By

Code::Blocksã§ã®ODE本サンプルプログラムã®ã‚³ãƒ³ãƒ‘イル法を説明ã—ã¾ã—ãŸï¼Žæ¬¡ã«ï¼Œè‡ªåˆ†ã§ä½œæˆã—ãŸODEを使ã£ãŸãƒ—ログラムã®ãƒ“ルド法を説明ã—ã¾ã™ã€‚Code::Blocksã¯ãƒžãƒ«ãƒãƒ—ラットフォームã§ã™ãŒã€ãƒ‘スãªã©ãŒé•ã†ãŸã‚æ–°ãŸã«è¨˜äº‹ã¨ã—ã¾ã—ãŸã€‚ã“れã¯Linux版ã§ã™ã€‚

  • 自作プログラムã®ãƒ“ルド法
    • 自作プログラムã¯homeディレクトリã®ä¸‹ã«src/ode-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·/roboSimuã¨ã„ã†ãƒ•ォルダを作り,ãã®ä¸­ã«ä½œæˆã™ã‚‹ã“ã¨ã«ã—ã¾ã™ï¼Žä»¥ä¸‹ã®ã‚ˆã†ãªãƒ‘スã«ãªã‚Šã¾ã™ï¼Ž
      • /home/ユーザå/src/ode-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·/roboSimu
    • roobSimuフォルダã®ä¸­ã«æ¬¡ã®ãƒ•ァイルをダウンロードã—,ãã®å ´æ‰€ã«è§£å‡ã—ã¾ã™ï¼Žãƒ‘ス㯠/home/ユーザå/src/ode-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·/roboSimu/pro1-1ã¨ãªã‚Šã¾ã™ï¼Ž
      • ダウンロードファイル: pro1-1.tgz
    • ã“ã“ã§ã¯ï¼Œç°¡å˜ã«ã™ã‚‹ãŸã‚ã«ODE付属デモプログラムをビルドã™ã‚‹ã¨ãã«ä½¿ç”¨ã—ãŸ/home/ユーザå/src/ode-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·/build/cb-gcc/demo_basket.cbpを使ã„ã¾ã™ï¼Žä¸Šã§è§£å‡ã—ãŸpro1-1ã®ä¸­ã«pro1-1.cppã¨demo_basket.cbpã®ãƒ•ァイルãŒã§ãã¦ã„ã‚‹ã¯ãšã§ã™ï¼Ž
    • demo_basket.cbpã®åå‰ã‚’hello.cbpã«å¤‰æ›´ã™ã‚‹ï¼Ž
    • Code::Blocksã‚’èµ·å‹•ã—,上ã§åå‰ã‚’変ãˆãŸhello.cbpã‚’é–‹ã.
    • 「プロジェクト(P)ã€â†’「プロパティã€ã‚’é¸æŠž
    • プロジェクト/ターゲット画é¢ãŒé–‹ãã®ã§ã€Œã‚¿ã‚¤ãƒˆãƒ«ï¼šã€ã‚’helloã«å¤‰æ›´ã—,「OKã€ã‚’クリック
    • 「プロジェクト(P)ã€â†’「ファイルã®å‰Šé™¤ã€ã§ï¼Œdemo_basket.cppã«ãƒã‚§ãƒƒã‚¯ã‚’ã„れ,「OKã€ã‚’クリックã™ã‚‹ï¼Ž
    • 「プロジェクト(P)ã€â†’「ファイルを追加ã€ã§ï¼Œhello.cppを追加ã™ã‚‹ï¼Ž
    • ã€Œè¤‡æ•°é¸æŠžã€ã®ç”»é¢ãŒé–‹ãã®ã§ï¼ŒDebugDoubleLibã«ãƒã‚§ãƒƒã‚¯ã‚’入れ「OKã€ã‚’クリック
    • 「プロジェクト(P)ã€â†’「プロパティã€ã‚’é¸æŠž
    • 「ビルドターゲットã€ã®ã‚¿ãƒ–ã‚’é¸æŠžã—,ビルドターゲットã¯DebugDoubleLibを残ã—,他ã¯å…¨éƒ¨å‰Šé™¤ã™ã‚‹ï¼Žå‡ºåŠ›ãƒ•ã‚¡ã‚¤ãƒ«å,オブジェクト出力ディレクトリを以下ã®ã‚ˆã†ã«å¤‰æ›´ã™ã‚‹ï¼Žã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—「OKã€ã‚’クリック.
      • 出力ファイルå: hello.exe
      • オブジェクト出力ディレクトリ: obj

    • 「ビルド(B)ã€â†’「ビルドã—ã¦å®Ÿè¡Œ(L)ã€ã‚’é¸æŠž
      • 赤ã„çƒãŒè‡ªç”±è½ä¸‹ã—,地é¢ã‚’çªã抜ã‘ãŸã‚‰æˆåŠŸï¼ŽãŠç–²ã‚Œæ§˜ï¼
      • ãªãŠï¼Œå‚考ã¾ã§ã«ä½œæ¥­å¾Œã®ãƒ—ロジェクトファイルã¯pro1-1after.tgzã§ã™ï¼Ž

ã§ã‚€

2 Responses to Code::Blocksを使ã£ãŸè‡ªä½œODEプログラムã®ãƒ“ルド法 (Linux)

  1. demu MonsterID Icon demu on 2011-11-08

    Hi,

    You can download premake4 as following web site.
    http://industriousone.com/premake

    cheers

  2. liizhen MonsterID Icon liizhen on 2011-11-07

    demuã•ã¾.
    I do things as you wrote above, but it can never work. The error messages are: undefined reference to dWorldStep and …. It seems that every function needs to be referenced to the related file, may be.

    I build it in ubuntu 11.10 + Codeblocks 10.5.

    and i cannot do the other method: premake4 –with-demos –with-tests codeblocks. it seems that the premake4 i’ve gotten is a bad one, the error massage is “command premake4 not found”.

    help me.
    Thank you, and good night.

コメントをã©ã†ãž

メールアドレスãŒå…¬é–‹ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。

2,102 views  (Since 2010-08-11)