Commits

opampg committed e07d01d

難点かのミス修正

  • Participants
  • Parent commits b5d2c7b
  • Branches dev

Comments (0)

Files changed (3)

src/CMakeLists.txt

 SET(TEST_DIR ${PROJECT_SOURCE_DIR}/src/test)
 SET(RESOURCES_DIR ${PROJECT_SOURCE_DIR}/src/resources)
 
+#utils
+ADD_LIBRARY(utils STATIC ${SRC_DIR}/utils.cpp)
+#Qt
 SET(MSRC
 	${SRC_DIR}/main.cpp
 	${SRC_DIR}/MainWindow.cpp
 ELSEIF(UNIX AND NOT APPLE)
 	ADD_EXECUTABLE(${EXECUTABLE_FILE_NAME} ${SRCS})
 ENDIF()
-TARGET_LINK_LIBRARIES(${EXECUTABLE_FILE_NAME} ${QT_LIBRARIES}) # Link 
+TARGET_LINK_LIBRARIES(${EXECUTABLE_FILE_NAME} ${QT_LIBRARIES} utils) # Link 
 
 IF(UNIX AND NOT APPLE)
 	INSTALL(TARGETS ${EXECUTABLE_FILE_NAME} RUNTIME DESTINATION bin)

src/MainWindow.hpp

 class MainWindow : public QMainWindow
 {
 	MainWindow();
-}
+};
 //  Utility functions used by the example programs.
 //
 
-#include "./util.hpp"
+#include "./utils.hpp"
 #include <cstdio>
 #include <cstdlib>
 
 // -----------------------------------------------------------------------------
 // File I/O
 
-int ExUtilReadFile(const char* const file_name,
-                   const uint8_t** data, size_t* data_size) {
+int ExUtilReadFile(const char* const file_name, const uint8_t** data, size_t* data_size) {
   int ok;
   void* file_data;
   size_t file_size;