💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
### CMakeList.txt示例 ```cmake cmake_minimum_required(VERSION 3.12) project(Test) set(CMAKE_CXX_STANDARD 11) MESSAGE(STATUS "Project: SERVER") #打印相关消息消息 MESSAGE(STATUS "Project Directory: ${PROJECT_SOURCE_DIR}") SET(CMAKE_BUILE_TYPE DEBUG) #指定编译类型 SET(CMAKE_C_FLAGS_DEBUG "-g -Wall") #指定编译器 #头文件 include_directories(./include/curl) include_directories(./include/json) #查找库所在目录FIND_LIBRARY FIND_LIBRARY(JSON_LIB lib_json ./lib NO_DEFAULT_PATH) FIND_LIBRARY(CULR_LIB libcurl ./lib NO_DEFAULT_PATH) #添加需要链接的库文件路径LINK_LIBRARIES link_libraries(${JSON_LIB} ${CULR_LIB}) ADD_SUBDIRECTORY(utility) #添加子目录 ADD_SUBDIRECTORY(server) add_library(lib_demo test.cpp main.cpp ) link_libraries(lib_demo) add_definitions(-DUNICODE -D_UNICODE) add_executable(Test test.cpp) #设置要链接的库文件的名称TARGET_LINK_LIBRARIES target_link_libraries(Test lib_json.lib) target_link_libraries(Test libcurl.lib) ```