diff --git a/src/tools/sqkctl/CMakeLists.txt b/src/tools/sqkctl/CMakeLists.txt index fe472712..f6879944 100644 --- a/src/tools/sqkctl/CMakeLists.txt +++ b/src/tools/sqkctl/CMakeLists.txt @@ -121,6 +121,10 @@ set_target_properties( ${proName} PROPERTIES ) endmacro(SquickOut) +if (UNIX) + SET ( CMAKE_CXX_FLAGS "-g" ) +endif() + SquickOut(${ProjectName} ${ProjectName} ${SolutionDir}/tools/bin ${ProjectName}) add_definitions( -D_CRT_SECURE_NO_WARNINGS diff --git a/src/tools/sqkctl/excel/mini_excel_reader.cc b/src/tools/sqkctl/excel/mini_excel_reader.cc index 77b5d460..4bac4bc3 100644 --- a/src/tools/sqkctl/excel/mini_excel_reader.cc +++ b/src/tools/sqkctl/excel/mini_excel_reader.cc @@ -41,7 +41,7 @@ bool Zip::open(const char *file) { char szCurrentFileName[PATH_MAX]; unz_file_info64 fileInfo; - int err = unzGoToNextFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0); + int err = unzGoToFirstFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0); while (err == UNZ_OK) { unz_file_pos posInfo; if (unzGetFilePos(_zipFile, &posInfo) == UNZ_OK) { @@ -52,7 +52,9 @@ bool Zip::open(const char *file) { entry.uncompressed_size = (uLong)fileInfo.uncompressed_size; _files[currentFileName] = entry; } + // std::cout << file << " loading: " << szCurrentFileName << " " << err << std::endl; err = unzGoToNextFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0); + } return true;