とりあえずDeepL翻訳した結果を置いておきますね。
WIWO井遠 さんが書きました: ↑2年前
質問ですが、OSはwindows10、コンパイル環境はvisual studio2010、dxlibのバージョンは3.24bです。 dxEncodeを使ってゲームデータをdxaとしてパッケージ化すると、コードがファイルが存在しないと表示されます。 (注:dxaパッケージはexeファイルと一緒にまとめられています)。
ファイルを読み込むための私のコードは以下の通りです。
コード:
int Title = LoadGraph("data\\Title.png");
しかし、以前、同じvs2010のバージョンと同じdxlibのバージョンを使って、win7のコンピュータでdxaファイルにパッキングすることに問題はありませんでした。また、以前win7コンピュータで行ったプロジェクトのデータファイルを、win10のコンピュータでdxaファイルにパッキングしてみました。 また、Win7で進めていたプロジェクトのデータファイルをWin10でdxaにパッケージングしてみましたが、dxaの内部ファイルが読めないという同じ問題が発生し、OSの問題なのかコンパイラの問題なのか、気になるところです。
Windows 10、g++ (GCC) 4.8.1 でアーカイブからの読み込みができました。
バイナリを用意したので、読み込みができるか試してみてください。
test.zip (添付に失敗したので、外部のサイトに置きました)
プログラムはエクスプローラから直接起動していますか?それともVisual Studioからですか?
Visual Studioから起動した場合、カレントディレクトリがexeファイルがあるディレクトリとは別のディレクトリになり、
読み込み失敗の原因になるかもしれません。
パスに一部の文字コードで表現できない文字が含まれると、読み込み失敗につながるかもしれません。
半角英数字のみからなるパスに置いて試してみてください。
I succeeded to read a file from an archive file using Windows 10 and g++ (GCC) 4.8.1.
Please try this binary to check if the read succeeds in your environment.
test.zip (I put this on an external site because attaching this file failed)
Are you launching your program directly from Explorer, or from Visual Studio?
When launched from Visual Studio, the working directory may differ from wher the exe file is located,
and it may lead to failure of loading.
Using characters that cannot be represented in some character code in the file path may lead to failure of loading.
Please try placing your program and data in a path that contains only half-width English alphabets and digits.