link taos_static for tcodbc

This commit is contained in:
freemine 2021-03-19 16:59:25 +08:00
parent 79e7343495
commit ef67b46901
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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;