These were the steps I followed:

1. Download from Github - https://github.com/apache/arrow - unzip it
2. Open Developer PowerShell for VS 2022 as Administrator
3. cd D:\path_to_arrow\14.0.1
4. cd .\cpp
5. mkdir build
6. cd build
7. cmake .. -G "Visual Studio 17 2022" -A x64 -DARROW_BUILD_TESTS=ON 
-DARROW_PARQUET=ON
8. Open arrow.sln files in build folder in VS
9. Build ALL_BUILD
10. Copy arrow.dll, arrow.pdb, parquet.dll, parquet.pdb files to Debug folder 
of project

In VS project Solution Explorer > Properties:
1. C/C++ > General > Additional Include Directories: add src directory
2. Linker > General > Additional Library Directories: add build/release/Debug 
directory
3. Linker > Input > Additional Dependencies: arrow.lib;parquet.lib

Cmake is version 3.27.7



-----Oorspronkelijk bericht-----
Van: Bryce Mecum <bryceme...@gmail.com> 
Verzonden: donderdag 16 november 2023 20:43
Aan: user@arrow.apache.org
Onderwerp: Re: [C++][Parquet] Unable to read memory??

Your code is correct so I think something else is going on. Can you give us 
more details about your environment, such as how you're getting the Arrow C++ 
DLLs (nuget, conda, building from source) and how you're compiling your program?



On Thu, Nov 16, 2023 at 4:27 AM <nick.sn...@telenet.be> wrote:
>
> Hi,
>
>
>
> I’m trying to get Parquet to work in C++. I have the following code:
>
>
>
> #include "arrow/io/api.h"
>
> #include "parquet/arrow/reader.h"
>
> #include "arrow/io/file.h"
>
> #include "parquet/stream_reader.h"
>
>
>
> int main()
>
> {
>
>     std::shared_ptr<arrow::io::ReadableFile> infile;
>
>
>
>     PARQUET_ASSIGN_OR_THROW(
>
>         infile,
>
>         
> arrow::io::ReadableFile::Open("D:/path_to_parquet_file/file.parquet"))
> ;
>
> }
>
>
>
> I get an error on PARQUET_ASSIGN_OR_THROW. It seems to be unable to read 
> memory. Exception that I’m getting:
>
> Unhandled exception at 0x00007FFE2866CF19 in cpp.exe: Microsoft C++ 
> exception: parquet::ParquetStatusException at memory location 
> 0x000000648DCFFC60.: parquet::ParquetStatusException at memory location 
> 0x000000648DCFFC60.
>
>
>
> What is wrong with this code? I’m using VS Community 2022 and Windows 10 
> 64bit.
>
>
>
> Kind regards,
>
>
>
> Nick

Reply via email to