From ef67b4690188501e6eda001b110c12df8eac1f07 Mon Sep 17 00:00:00 2001 From: freemine Date: Fri, 19 Mar 2021 16:59:25 +0800 Subject: [PATCH] link taos_static for tcodbc --- src/connector/odbc/examples/c/CMakeLists.txt | 2 +- src/connector/odbc/examples/c/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connector/odbc/examples/c/CMakeLists.txt b/src/connector/odbc/examples/c/CMakeLists.txt index 4af22c00eb..7821f894d0 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 967bd32090..e36c75688e 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; -- GitLab