diff --git a/C/source/CMakeLists.txt b/C/source/CMakeLists.txt index 1c324fb..948d2f7 100644 --- a/C/source/CMakeLists.txt +++ b/C/source/CMakeLists.txt @@ -20,8 +20,9 @@ add_subdirectory(idgen) ##编译执行文件 set(LIB_SRC YitIdHelper.h YitIdHelper.c) add_library(YitIdHelper ${LIB_SRC}) + add_executable(YitIdGen main.c) -target_link_libraries(YitIdHelper idgen) target_link_libraries(YitIdGen YitIdHelper) +target_link_libraries(YitIdGen idgen) diff --git a/C/source/idgen/common.h b/C/source/idgen/common.h index b4f15cf..3a27611 100644 --- a/C/source/idgen/common.h +++ b/C/source/idgen/common.h @@ -8,6 +8,6 @@ #define TAP_DLLEXPORT __declspec(dllexport) #else #define TAP_CDECL -#define TAP_DLLEXPORT __declspec(dllexport) +#define TAP_DLLEXPORT #endif diff --git a/C/source/main.c b/C/source/main.c index 19221e1..39cf21e 100644 --- a/C/source/main.c +++ b/C/source/main.c @@ -16,7 +16,7 @@ const int GenIdCount = 50000; -const bool multiThread = false; +const bool multiThread = true; const int threadCount = 50; const int method = 1;