hosseinmoein / DataFrame

C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types and contiguous memory storage
https://hosseinmoein.github.io/DataFrame/
BSD 3-Clause "New" or "Revised" License
2.53k stars 313 forks source link

use VS2022 #330

Closed winer-lch closed 1 month ago

winer-lch commented 1 month ago

Usal Studio 2022 compiler support, now there is a template class can not connect to the external symbol error, how to debug

hosseinmoein commented 1 month ago

I need more details to help you. Copy the actual compiler errors here.

Did you follow the CMake instructions in docs?

winer-lch commented 1 month ago

The following is the error message:

Severity Code Description The project file line does not display status Error LNK2001 cannot resolve the external symbol of"public: void __cdecl hmdf::HeteroVector::clear(void)" (?clear@HeteroVector@hmdf@@QEAAXXZ) tezst C:\Users\12875\Desktop\Part_time_job\tezst\tezst\Main.obj

Severity Code Description The project file line does not display status Error LNK2001 cannot resolve the external symbol ofpublic: __cdecl hmdf::HeteroVector::HeteroVector(struct hmdf::HeteroVector &&)" (??0HeteroVector@hmdf@@QEAA@$$QEAU01@@Z) tezst C:\Users\12875\Desktop\Part_time_job\tezst\tezst\Main.obj

In vs2022, it is not possible to refer to a dataframe directly using include,if not, what should be done?

hosseinmoein commented 1 month ago

I am not very familiar with Windows development environment, but I know a lot of people who use DataFrame and compile it on Windows.

From the error message, it seems that compiler cannot see all the header files including the .tcc files.

Also, DataFrame is not a header-only library. It means you must first build the DataFrame library and then link with it.

winer-lch commented 1 month ago

After the source code is downloaded, is there anything else you need to do, such as build a library? Now I am downloading the source code through the linker to connect the include part of the Dataframe, error, I think is in vs2022, when using the template class, can not find the definition; What's the solution?

hosseinmoein commented 1 month ago

Template definitions are in .tcc files. Make sure those files are accessible

winer-lch commented 1 month ago

thanks,I know,header and tcc in same directory ,but in vs2022,unable to find template definition,when used, how should be configured?

hosseinmoein commented 1 month ago

I don't know. You should ask somebody who knows VS and Windows development environment.

Try using CMake instead. The instructions are in the docs.

winer-lch commented 1 month ago

Hi author, did you know to package as lib under window?

hosseinmoein commented 1 month ago

I don't know anything about VS or Windows development environment.

But you have the option of using CMake or either of Conan or VCPKG package managers. Package managers will download the repo and build/install it for you. See build instructions in documentation