s-simoncelli opened a new issue, #14354:
URL: https://github.com/apache/arrow/issues/14354

   Hello
   
   I have been having issues linking arrow when compiled from source or using 
msys64 for a C++ project:
   
         [2/2] Linking CXX executable test_project.exe
         FAILED: test_project.exe 
         cmd.exe /C "cd . && 
C:\Users\netce\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\222.4167.35\bin\mingw\bin\g++.exe
 -g  CMakeFiles/test_project.dir/main.cpp.obj -o test_project.exe 
-Wl,--out-implib,libtest_project.dll.a 
-Wl,--major-image-version,0,--minor-image-version,0  "C:/Program 
Files/arrow/lib/arrow_static.lib"  -lkernel32 -luser32 -lgdi32 -lwinspool 
-lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
         
C:\Users\netce\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\222.4167.35\bin\mingw\bin/ld.exe:
 
CMakeFiles/test_project.dir/main.cpp.obj:C:/Users/netce/CLionProjects/untitled/main.cpp:5:
 undefined reference to `arrow::int16()'
         collect2.exe: error: ld returned 1 exit status
         ninja: build stopped: subcommand failed.
   
   My CMakeLists.txt file is:
   
       cmake_minimum_required(VERSION 3.23)
       project(test_project)
       
       set(CMAKE_CXX_STANDARD 14)
       
       #set(CMAKE_PREFIX_PATH "C:/msys64/mingw64")
       include_directories(C:/Program Files/arrow)
       #include_directories(C:/msys64/mingw64)
       find_package(Arrow REQUIRED)
       if (Arrow_FOUND)
           message(STATUS "Found Apache Arrow ${ARROW_VERSION}")
       else()
           message(FATAL_ERROR "Could NOT find Apache Arrow")
       endif()
       
       add_executable(test_project main.cpp)
       target_link_libraries(test_project PRIVATE arrow_static)
       #target_link_libraries(test_project PRIVATE arrow_shared)
   
   and my main.cpp is:
   
       #include <iostream>
       #include <arrow/type_fwd.h>
       
       int main() {
           arrow::int16();
       
           std::cout << "Hello, World!" << std::endl;
           return 0;
       }
   
   Can anybody help me out?
   
   Thanks
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to