Closed fxsts closed 8 months ago
Do you mean the Windows DLL? If so, I am not familiar with Windows development environment. May be @SpaceIm or @yssource can help
Yes, Windows DLL. Whether the dataframe is compiled into a static library or a dynamic library, when used in Windows DLLs, get_ column return empty vector. However, in executable programs or static libraries, the returned data is correct.
This may help https://stackoverflow.com/questions/44612626/dll-static-vector-which-is-filled-up-at-dll-s-initialization-time-returns-zer But, as I said I am not a Windows programmer.
After many tests, DataFrame cannot be used in the windows dll, and the returned vector is empty. For example, A is an executable program that defines DataFrame instance D1; B is dll, A passes D1(a reference or pointer) to B, adds data in B, uses get_column in A to get the data of D1, and returns a vector that is still empty. Is it related to DataFrame using vector?
I am not a windows programmer but my gut feeling is that you are not using DLL the correct way. DLL is a very convoluted piece of engineering. You either have to ask a Windows programmer expert or open a question in stack overflow.
Hello,Mr. Hosseinmoein
1,I have compiled the library myself, and also compiled it through Conan.Used it in windows dll,get_column returns emtpy vector. 2,I have compiled the library myself, and also compiled it through Conan.Used it in ubuntu(ver22.04) ,get_column returns the correct data. 3,windows and ubuntu platforms, development tool is CLion, through cmake build, test code is exactly the same.
At 2023-10-24 21:24:18, "Hossein Moein" @.***> wrote:
I am not a windows programmer but my gut feeling is that you are not using DLL the correct way. DLL is a very convoluted piece of engineering. You either have to ask a Windows programmer expert or open a question in stack overflow.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Writing it here doesn't help. Open an issue on stack overflow and describe it in terms of STL vectors.
Sorry,Mr. Hosseinmoein,not replying on time, the following is a little personal understanding: 1, in the windows dll encountered the get_column return empty vector problem, and there is no error or stack overflow problem, the reason is most likely std::vector in windows itself (SIOF). 2, dataframe uses std::vector to store column data, and SIOF problems are inevitable when used in windows dll.
DataFrame is being used by several teams on Windows. So It is already useable on Windows. By "stack overflow" I mean the internet site (https://stackoverflow.com) where you can go and ask questions. Since I don't know Windows programing, I suggest you go to stack overflow and ask the question there.
Currently, this problem only occurs in windows dll, static libraries and executables on windows systems are normal, as are linux and mac os. I wonder if I could refer one of the teams to ask how to use dataframe in windows dll.
When using hosseinmoein DataFrame in dynamic libraries, get_column returns an empty data vector, but is normal in static libraries and executable programs.