yzdad / D-GLSNet

The code of Geo-localization with Transformer-based 2D-3D match Network
38 stars 6 forks source link

seeking error solutions #2

Closed gentleman-zhong closed 10 months ago

gentleman-zhong commented 1 year ago

Hello author,

I hope you're doing well. I'm reaching out regarding your [Project Name] project. Firstly, I'd like to inquire whether the project is expected to run on the Windows operating system.

If the project is compatible with Windows, I've been encountering a recurring error that I would appreciate your insights on. The error message is as follows:

“grid_subsampling.obj : error LNK2001: unresolved external symbol public: long * __cdecl at::tensorbase::data_ptr(void) const (??$data_ptr@j@tensorbase@at@@qebapeajxz) build\lib.win-amd64-cpython-38\ext.cp38-win_amd64.pyd : fatal error LNK1120: 1 unresolved external command error: command d:\professionalsoftware\visual studio\community\vc\tools\msvc\14.37.32822\bin\hostx86\x64\link.exe failed with exit code 1120”

I've read through various resources, including blog posts, suggesting that this error might be related to differences in handling the long data type between Linux and Windows. I wanted to seek your expert opinion on this matter. Could you share your perspective on whether this could be a compatibility issue between the two systems? If possible, could you suggest any potential workarounds or solutions?

Your guidance on this matter would be invaluable. If you require additional details from my side, please don't hesitate to ask. Thank you for your dedication to maintaining this project.

Looking forward to your insights.

Best regards

gentleman-zhong commented 1 year ago

When building a project using the python setup.py build develop command on a windows system.

yzdad commented 1 year ago

Sorry, our project is developed on Ubuntu 18.04. I have no experience developing on windows, and I am not sure about the specific problem. But as far as I know, on 64-bit Linux platform, long resolves to long long (64-bit type), while on 64-bit Windows platform, long resolves to int (32-bit type). You can try to change all "long" in all .h, .cpp, .hpp files in extensions directory to "int64_t" or "long long".

gentleman-zhong commented 1 year ago

Thanks for replying in such a busy schedule. I have already tried to modify the data type, but there will be new errors. I will try to run this project in the Ubuntu system.