Skip to content

Commit af8035e

Browse files
committed
Resolve Unix-odbc vs. IODBC linking issue
Put `ODBCINST` before `ODBC_LIBRARIES` in terms of linking. Co-Authored-By: Alina (Xi) Li <alinal@bitquilltech.com>
1 parent eae50e2 commit af8035e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ else()
5050
${ARROW_TEST_SHARED_LINK_LIBS})
5151
endif()
5252

53-
set(ARROW_FLIGHT_SQL_ODBC_TEST_LIBS ${ODBC_LIBRARIES} ${ODBCINST} ${SQLite3_LIBRARIES})
53+
# On macOS, link `ODBCINST` first to ensure iodbc take precedence over unixodbc
54+
set(ARROW_FLIGHT_SQL_ODBC_TEST_LIBS ${ODBCINST} ${ODBC_LIBRARIES} ${SQLite3_LIBRARIES})
5455

5556
# On Windows, dynamic linking ODBC is supported, tests link libraries dynamically.
5657
# On unix systems, static linking ODBC is supported, thus tests link libraries statically.

0 commit comments

Comments
 (0)