ããã«ã¡ã¯chiMaã§ãã
ä»åã¯ãã£ã¤ãèªåã®è¶£å³ã«é¢ãã¦èª¿ã¹ã¦åãã£ããã¨ãåå¿é²ã®ä¸ç°ã¨ãã¦æ®ãã¦ããå 容ã«ãªãã¾ãã
æ£ç´ãæ®æ®µã®ãã©ãã¯ã¼ã¯ããã²è¨äºãè¦ã¦ããæ°ãããã®ã§
ãããªããããè¦ã¦ãå°ãã¨æãããä»åã¯ä»¥ä¸ã®ç¹æ®ãªã¦ã¼ã¶ã¼ã®ããã®ç¥è¦ã«ãªã£ã¦ãããã°ãããªã¨æã£ã¦ãã¾ãã
ä»åãããã¨ãããã¨
ã»VisualStudioã使ããããªãï¼UIãå«ãï¼
ã»Clionã§ã²ã¼ã ãä½ãããï¼ãã以å¤ã®IDEã§ãå¯ï¼
ã»ããã«DxlibãEffekseerã使ããã
å ã«ãªãã ãè¨ãã¨ã¾ã Clionãè³¼å ¥ãã¦ããªã人ãããã¦VSãå«ããããªãã£ã¦äººã¯ãã¨ãªããVisualStudioã使ã£ãã»ããè¯ãã§ãã
ä½æ ãªãæç®ãå¤ãå¤ãªå°ãæ¹ãããªãããã§ãã
ï¼ãã®åå¾è¿°ã®msvcã§è¦ããããããã¨ã¯ããã¾ããï¼ï¼è¨ãã¦èª¤å·®ï¼
ããã¯ããã¾ã§VisualStudioã«è¦ªã殺ããããã©C++ã§ã²ã¼ã ãä½ããã人åãã§ã¯ããã¾ãã
ãã¦ãCLionã§ã²ã¼ã ä½ãã¾ãããã£ã¦ãªã£ãæã«æåã«ã¶ã¡ãããå£ã
Dxlibã®åããæ¹ã§ãã
æ ¹æ°ãã調ã¹ã人ã§ããã°ããããä¸ã®è¨äºãè¦ã¤ãããã¨æãã¾ãã
æ£ç´ãDxlibãåããã ããªãããã§å ¨ãåé¡ããã¾ããã
Effekseerãªãã¦ä½¿ããªããï¼ï¼ã£ã¦äººã¯ããã§å¼ãè¿ãã¦ãã ããã
ããããå ã®è¨äºã«ä½ã®æå³ããªãã®ã§ã
ã»æ¹ãã¦çµç·¯èª¬æ
ä»åã¯ãEffekseerãã¨å¼ã°ããã¨ãã§ã¯ãåçãã¼ã«ã使ãããã¨èããã¨ããããå§ã¾ãã
ãã®ãã¼ã«ã¯ããã§ãã¦ãã¦ã¨ãã§ã¯ãä½ææªçµé¨ã®äººã§ãã¨ãã§ã¯ããæ軽ã«ä½ãããããã®ã§ããã
ããããããæ軽ã«ã²ã¼ã å ã«åãè¾¼ããã¨ãåºæ¥ãã¨æ¥ãã使ããªãããã«ã¯ãããªãã ããã
ã²ã¼ã ããã°ã©ãã³ã°ããã¨ãã§ã¯ãã«é¢ãã¦ã®å¦çããã£ããæ¶ããã®ã ããã便å©ã£ãããããããªããåæ¥ã§ããããã ãã
ã¨ããããããã§åé¡ãèµ·ããã
ãã¡ãã®ãã¼ã¸ã§Dxlibç¨ã®ã©ã³ã¿ã¤ã ãDLããã¨ãã«ã¨ãã§ããªããã¨ãæ¸ããã¦ããã®ã ã
ç¾å¨ãVisualStudio 2017,2019å°ç¨ã§ãã
ç¾å¨ãVisualStudio 2017,2019å°ç¨ã§ãã
ç¾å¨ãVisualStudio 2017,2019å°ç¨ã§ãã
ãï¼
ããã¾ã§èªãã§ãã人ãªãæ°ä»ããã ããã
ãããCLionã§ã¯ä½¿ããªãã®ã ã
ãããããè¨ãæããããMinGWã§ã¯ä½¿ããªãã®ã ã
èªåãå½åã¯æåã«è²¼ã£ãã¯ã¦ãªããã°ã§ã®è¨äºã®å 容ããã®ã¾ã¾ãã£ãã®ã§MinGWãã¤ã³ã¹ãã¼ã«ãã¦ããã§ãã«ããã¦ããã®ã ã
ãã«ãåºæ¥ãªãã¨ãããä½ããªããããï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ä½¿ããªããããï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼
ããããã®è©¦è¡é¯èª¤ã®é£ç¶ãæ£ç´ããã解æ¶ããã®ã«ï¼ãæã¯æãã£ãã
ãã¸ã§ï¼ãæéè¿ãã¦ã»ããã
ã»æ¤è¨¼ãããã¨
ããã«é¢ãã¦ã¯çããç¥ãããã ãã®äººã¯è¦ãªãã¦ãããã§ãã
ã¾ãããããåæç¥èã¨ãã¦ãMinGWãã§ã¯.libãã¡ã¤ã«ãåãæ±ããªãã
ãããããè¨ãã°ãMinGWãã§æ±ãã®ã¯ãlib*.aããã¡ã¤ã«ã
æ¥é è¾ã«libãã¤ããæ¡å¼µåaã®ãã¡ã¤ã«ã
ããã«é¢ãã¦ã¯Dxlibãåããæç¹ã§å°å ¥ããã®ã§æ°ä»ãæ¹ãå¤ãã¯ãã
ã¾ãããã¡ã¯æ°ä»ããªãã£ããããã©
ãã®ãããèªåãèããã®ã¯ãlib*.aãã«å¤æã§ããªããã
ã¾ããã§ããªãã£ããã§ããã©ãã
reimpã¨ãããmingw-utils-0.3ãã«å°å ¥ããã¦ãããã¼ã«ã使ãã°
libãã¡ã¤ã«å ã®objããã¹ã¦.aãã¡ã¤ã«ã«ããããã§ã¾ã¨ãã¦ãããã¨ãããã®
çµå±ããã§ã¾ã¨ãã¦ãèªã¿è¾¼ãã§ãããªãã
èªã¿è¾¼ãã¨ãã«ãCMakeã«ããããæ¸ãè¾¼ãã§è©¦ãããã§ããã©ä½ã«ãã¡ã¢æ®ãã¦ããªãã®ã§ããããªãããã ãMinGWãèªã¿åãã«è¡ããã¨ãã¦å¤±æãã¦ããã®ã ãç解ã§ããã
ããããã£ã¡ãæããããã
ã²ã¨ã¾ããreimpãä½åº¦ã試ãã¦ã¿ããã©ãã¡ã ã£ãããããããã¦
teratailã§æ¢ãã¾ãããã
ããã¯ããã¨CLionã£ã¦msvc使ããããã«è¦ããã®ã§ããã»ã»ã»
ãï¼
msvcãããªãã¡VisualStudioã«ä½¿ã£ã¦ããã³ã³ãã¤ã©ããããã¬ãCLionã§ä½¿ããã¨ããã®ã ã
ãããMinGWãå ¥ããæå³ãã
ãã¼ã¼ã¼ããä»æ¹ããªãã®ã§å ¥ãããã¨ã«ãããã
ã¨ããããã§ããããå ãå®éã®å¯¾å¿æ¹æ³ã
ã»å¯¾å¿æ¹æ³
ã¾ãã¯MSVCãã¤ã³ã¹ãã¼ã«ããã
ãã®éã«å人éçºã§ããã°ãã³ãã¥ããã£ããããã¦ã³ãã¼ããã¦ããããéãã¾ãã
è²ã èããã¾ããã²ã¼ã éçºã§ããããå¿ è¦ãªã®ã¯
ã».NETãã¹ã¯ãããéçº
ã»C++ã«ãããã¹ã¯ãããéçº
ã»ã¦ããã¼ãµã«Windows ãã©ãããã©ã¼ã éçº
ã»C++ã«ããã²ã¼ã éçºï¼æ£ç´ããã®ãå¾®å¦ãªã¨ããï¼
ã®4ã¤ã«ãã§ãã¯ãå ¥ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã
ã¤ã³ã¹ãã¼ã«å¾ã«CLionã®Settingsã確èªãä¸è¨ã®ããã«ãªã£ã¦ããã°OK
ããDebuggerã«å¤ãèªåã§å ¥ããªãå ´åã¯CMakeã®verãå¤ãå¯è½æ§ãããã¾ãã
ç»åã¨åãããã«3.19以éã«ãããã¨ãæ¨å¥¨ãã¾ãã
ããããMSVCã¯æåãã使ãã¦ããããã§ã¯ãªãã®ã§2018å¹´ã¨ããããã¸ãã ã¨ç¡çã ã£ãã¯ãã
次ã«CMakeLists.txtã§
set(SOURCE_FILES main.cpp)
ã
set(SOURCE_FILES WIN32 main.cpp)
ã«å¤æ´ãã¦ã
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
add_executable(projectName ${SOURCE_FILES})
target_link_libraries(
projectName
DxLib
DxDrawFunc
zlib
vorbis_static
vorbisfile_static
ogg_static
opusfile
opus
silk_common
celt
)
ã追è¨ãã¾ãã
target_link_librariesã®ä¸èº«ã¯MinGWã®æã«æ¸ãã¦ããå 容ãå°ãæ¹å¤ããã ãã«ãªãã¾ãã
æ¹å¤ããå 容ã¨ãã¦ã¯ä¸åº¦æ¹å¤ããã«ãã«ãããã°ãããã¨æããã§ãã
ä¸é¨ã®libã§multiple definitionã¿ãããªéè¤å®ç¾©ã ã¨ããããªæããæ¹ããã¾ãã
å®éã®ã¨ããããããCMakeListsã§å®ç¾©ããã¨ãã»ãã®libãèªã¿è¾¼ãã§ããã¦ãã£ã½ããã§ããããªã®ã§ãæ¶ããã£ã¦ã ãã§ããã
ãããã使ã£ã¦ããªãããæ¶ããã®ãã¿ã¼ã³ã®å¯è½æ§ãããã®ã§ãããåããªãããã§ããã°æ¶ãã奴ãä¸ã¤ãã¤æ»ãã¦ã¿ãã¨è¯ãããã
ããã¦ãæå¾ã«Dxlibã¨Effekseerã®ãããã¸ã§ã¯ãã«è¿½å ãã¹ããã¡ã¤ã«_VCç¨ãã®ä¸èº«ãlink_directoriesã§æå®ãã¦ãããã©ã«ãã«å ¥ãã¾ãã
ï¼å ¨é¨å ¥ããªãã¦ã大ä¸å¤«ã§ããå¹´æ¸ãã¦ãããã¤ã¨ãï¼
èªåããã£ãã®ã¯ãã¨ã¯mainãããªãã«ãããã°åãã¨æãã¾ãã
æ£ç´ãããã«3ãæãæããã®ã¯æ³å®å¤ã§ããã
ãããæ®éã«MSVC使ãã°è¡ããã¨æãããããreimpããç¡çã ã£ã¦çºè¦ããã¾ã§ã«1ãæããã£ã¦ããã ãããã¤ãããããµããã
ãªãã¨ãåãããã«ãªã£ããããããã©ã
MinGWå´ã ã¨ãã£ã¦ããã¦ãint longã®æé»å¤æã¨ãã§
MSVCã¯å ¨é¨è¦ååºãã¦ãã¦ãã¡ããã¡ãããããã®
ãããè¦åã£ã¦ã ããªã®ã§æ®éã«åããã§ããã
æ°ãåããããã«è¦åã®æ¶ãæ¹ã調ã¹ããã© MSVCãã«ãé ãæ°ããããæ°ã®ããããªã»ã»ã»
ãããã§ãã¹ãã®æéããããã¾ãã£ã¦ã»ã»ã»ãã¼ã¼ã¼ã
ä»å¾ããããããã調ã¹ã¦ããã¨ãã«è©°ã¾ã£ãå 容ãæãããæ¸ããªãã£ããããããã
次ã¯ããã²è¨äºããªãã»ã»ã»
æ¸ããããã®ã¯ãããã»ã»ã»ãããæ¸ããããã®æããªãããããªããã®ã©ã£ã¡ãããã®ã§ãã¦ã»ã»ã»
ï¼ï¼ï¼ï¼ï¼ï¼
ããã§ã¯ã¾ãã©ããã§