#includeの順番によってエラーが出てしまいます。
まず、Ultimate++という、かなりマイナーなGUIの制作環境を用いてYSEというライブラリを
使おうとしたのですが、#inlucdeの順番によってエラーが出ます。
http://www.ultimatepp.org/
https://github.com/yvanvds/yse-soundengine/releases
正しく通るコード
C++
1#ifndef _YSETest2_YSETest2_h 2#define _YSETest2_YSETest2_h 3 4#include "yse.hpp" //YSEの本体 5#include <CtrlLib/CtrlLib.h> //Ultimate++の本体 6using namespace Upp; 7 8#include <iostream> 9#include <cstdlib> 10 11#if defined YSE_WINDOWS 12#include <conio.h> 13#else 14#include "wincompat.h" 15#endif 16 17#define LAYOUTFILE <YSETest2/YSETest2.lay> 18#include <CtrlCore/lay.h> 19 20class YSETest2 : public WithYSETest2Layout<TopWindow> { 21public: 22 typedef YSETest2 CLASSNAME; 23 YSETest2(); 24}; 25 26#endif
通らないコード
C++
1#ifndef _YSETest2_YSETest2_h 2#define _YSETest2_YSETest2_h 3 4#include <CtrlLib/CtrlLib.h> 5using namespace Upp; 6 7#include "yse.hpp" 8#include <iostream> 9#include <cstdlib> 10 11#if defined YSE_WINDOWS 12#include <conio.h> 13#else 14#include "wincompat.h" 15#endif 16 17#define LAYOUTFILE <YSETest2/YSETest2.lay> 18#include <CtrlCore/lay.h> 19 20class YSETest2 : public WithYSETest2Layout<TopWindow> { 21public: 22 typedef YSETest2 CLASSNAME; 23 YSETest2(); 24}; 25 26#endif
エラー文
yse_binary_release_windows\include\sound/sound.hpp (36): error C2059: 構文エラー: '定数'
yse_binary_release_windows\include\sound/sound.hpp (36): error C3805: '定数': 予期しないトークン。'}' か ',' が必要です。
yse_binary_release_windows\include\synth/synth.hpp (37): error C2059: 構文エラー: '__stdcall'
yse_binary_release_windows\include\synth/synth.hpp (37): error C3805: '__stdcall': 予期しないトークン。'}' か ',' が必要です。
yse_binary_release_windows\include\io.hpp (27): error C2059: 構文エラー: '('
yse_binary_release_windows\include\io.hpp (27): error C2091: 関数は関数を返せません。
yse_binary_release_windows\include\io.hpp (27): error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません
yse_binary_release_windows\include\io.hpp (27): error C2059: 構文エラー: ')'
sound.hppの中身はこのようになっています
C++
1namespace YSE { 2 /** Every subSystem consists out of several class which are meant to work together. 3 They all have an interface, implementation, manager, message and a message enumeration. 4 5 */ 6 namespace SOUND { 7 class interfaceObject; 8 class implementationObject; 9 class messageObject; 10 class managerObject; 11 enum MESSAGE { 12 POSITION, 13 SPREAD, 14 VOLUME_VALUE, 15 VOLUME_TIME, 16 SPEED, 17 SIZE, 18 LOOP, 19 INTENT, 20 OCCLUSION, 21 DSP, 22 TIME, 23 RELATIVE, 24 DOPPLER, 25 PAN2D, 26 FADE_AND_STOP, 27 MOVE, 28 }; 29 } 30 31 // the interface itself gets a more generic name, so that users can just 32 // define a 'sound' to get an interface object. 33 typedef SOUND::interfaceObject sound; 34} 35 36
おそらく何らかの初歩的な物だと思うのですが、エラー文に具体性が無くて
具体的に何が原因なのか分かりません。よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/16 02:04
2016/10/16 02:44
2016/10/16 07:41