0

Marmalade (6.3) でゲームの開発を開始しようとしています。しかし、新しいソース (.cpp および .h) を作成して mkb に追加し、プログラムを実行しようとすると、「パスで file.cpp が見つかりません」というエラーが表示されました。 . これは、新しい 2D ゲーム プロジェクトを選択したときに Marmalade によって作成されたファイル (game.h、game.cpp、main.cpp) を除くすべてのファイル用です。.cpp および .h ファイルを別の場所に追加する必要がありますか?

ありがとう

4

2 に答える 2

2

詳細な情報がなければ、明確な答えを出すことは困難です。ただし、例からコピーして貼り付けただけで、ファイルセクションの構文について理解していないと思います。基本的:

files
{
    (foo)
    humbug.cpp
)

The "(foo)" might look very innocent, but it actually says that humbug.cpp is actually in directory foo - relative to the mkb file. It is common practice to actually use "(source)" and put all the source files in a directory of that name - making the source layout a bit neater.

Naturally if you have (source) and don't put the files actually in directory source, they won't be found. My guess is that is what you are seeing.

于 2013-08-08T05:25:51.150 に答える
1

前の回答を明確にするために、filesディレクティブの形式は次のようになります-

files
{
    (<Path relative to MKB>,<Alternate Path>)
    ["Name of the parent Group in VS/XCode project","Name of the subparent group"]
    fileName.cpp
    fileName.h
}

たとえば、私は2つのファイルをSoundManager.h持っています. ファイルディレクティブは次のようになります-SoundManager.cppSystemSourceMainMenu.hMainMenu.cppSource/UI

files
{
    (Source/System)
    ["Source","System"] #This part is not required, it's just to arrange your files in IDE project
    SoundManager.h
    SoundManager.cpp

   (Source/UI)
   ("Source","UI")
   MainMenu.h
   ManinMenu.cpp
}
于 2013-08-08T12:55:42.807 に答える