Skip to content

[Q] Is there support for MSVC? #89

Closed
@ablearthy

Description

@ablearthy

clickhouse-cpp located in 3rd folder.

There's my cmake file:

cmake_minimum_required(VERSION 3.16)
project(clickhouse_bench)

set(CMAKE_CXX_STANDARD 17)

add_subdirectory(3rd/clickhouse-cpp)

include_directories(3rd/clickhouse-cpp)


add_executable(clickhouse_bench main.cpp)
target_link_libraries(clickhouse_bench clickhouse-cpp-lib)

clickhouse-cpp-lib is compiled successfully, but clickhouse_bech isn't compiled because nmake can't find clickhouse-cpp-lib library. What's the problem?

UPD: set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) solved the problem, but now while starting the program Windows can't find clickhouse-cpp-lib.dll

UPD2: I put clickhouse-cpp-lib.dll into the folder where executable file is located. At least it starts, but now it fails on creating client

UPD3: I removed SetNonBlock before connect (line). Thanks, @victor-zou (#80, p. 4). Now selecting and inserting data works fine!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions