diff --git a/src/connector/odbc/examples/c/CMakeLists.txt b/src/connector/odbc/examples/c/CMakeLists.txt index 4af22c00eb98c596b2ccfc0e0c644dbc5eafd302..7821f894d072e129be563805a10901e403e3cf2a 100644 --- a/src/connector/odbc/examples/c/CMakeLists.txt +++ b/src/connector/odbc/examples/c/CMakeLists.txt @@ -14,7 +14,7 @@ ENDIF () IF (TD_WINDOWS_64) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /GL") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL") - TARGET_LINK_LIBRARIES(tcodbc taos odbc32 odbccp32 user32 legacy_stdio_definitions os) + TARGET_LINK_LIBRARIES(tcodbc taos_static odbc32 odbccp32 user32 legacy_stdio_definitions os) ADD_EXECUTABLE(tms main.cpp) TARGET_LINK_LIBRARIES(tms odbc32) diff --git a/src/connector/odbc/examples/c/main.c b/src/connector/odbc/examples/c/main.c index 967bd320901117c04076f8e7b40ed7d9624e25ae..e36c75688e3440a62b66fa5fc2f8b13b83f55237 100644 --- a/src/connector/odbc/examples/c/main.c +++ b/src/connector/odbc/examples/c/main.c @@ -707,7 +707,7 @@ static int do_taos_stmt(TAOS *taos, insert_arg_t *arg) { const char *sql = "insert into test.v values (?,?,?,?,?)"; int r = 0; do { - r = taos_stmt_prepare(stmt, sql, strlen(sql)); + r = taos_stmt_prepare(stmt, sql, (unsigned long)strlen(sql)); if (r) { OD("taos_stmt_prepare [%s] failed: [%d]%s", sql, r, tstrerror(r)); break;