0

I am completely new to developing C++ on Windows. Only knows the very basic to compile and run helloworld.

I am using VSCode. Followed the C++ extension guide to install MingW64 using MSYS2. I can run my hello world program in VSCode. Then I install Apache Arrow also using MSYS2.

Then I copy some Arrow example code. There is no syntax or reference error. VSCode intellisense correctly show me those Arrow classes and functions.

Included these in my header file.

#include <arrow/api.h>
#include <arrow/compute/api_aggregate.h>
#include <arrow/csv/api.h>
#include <arrow/csv/writer.h>
#include <arrow/io/api.h>
#include <arrow/result.h>
#include <arrow/status.h>

When I try to run it in VSCode. All default with "g++.exe build and debug active file" I get some reference error.

\source\ArrowTest/arrowtest.hpp:29: undefined reference to `__imp__ZN5arrow19default_memory_poolEv' ....... collect2.exe: error: ld returned 1 exit status

I think the default is not correctly linking those Arrow library (.so files?)
I want to know how to configure VSCode so that the C++ extension could correctly link library from MSYS2.

P.S. Not a duplicate question to running command line g++

Maxi Wu
  • 1,274
  • 3
  • 20
  • 38

0 Answers0