Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flann Throws Error Regarding "pop_t': Identifier not found in dist.h file #386

Open
mdmorar opened this issue Aug 15, 2018 · 17 comments
Open

Comments

@mdmorar
Copy link

mdmorar commented Aug 15, 2018

Hi,

I am using VCPKG to install packages on my windows machine for Visual Studio 2017. I was working with the previous versions of PCL 1.8.0. There is a flann component somewhere apart of this library which uses the flann library as a prerequisite to do a nearest neighbor search for a kdtree.

I have just upgraded to the current version of PCL 1.8.1 as well as OpenCV 3.4.1 which also has a flann plugin associated with it. Regardless, my C++ program will not compile due to the value "pop_t" which cannot be found for some reason.

image

image

I suspect this is a bug, but am on a strict deadline of next week with this. I am on version Flann v1.9.1-7 at the moment but was probably on the previous 1.8.5 version. I am not too sure about the previous version. Please help me resolve this quickly.

Thanks for your help.

Monil

@mdmorar
Copy link
Author

mdmorar commented Aug 17, 2018

In order to fix the issues and get my program and the PCL libraries working correctly I had to move the "typedef unsigned long long pop_t;" outside the #if and #else so that either one will use the parameter to do the math. I don't know if this was the intent of this code but in order to progress in my software application I needed this error fixed. Please fix this as soon as possible and let me know so I can just update the flann and not worry about it.

Cheers.

@elliottzheng
Copy link

@mdmorar Hi, I met the same problem as you. It wouldn't happen before my updating visual studio 2017. Since I'm using the same pcl setting before and after the problem happens, I guess it may be the update of visual studio to blame.

@RDCH106
Copy link

RDCH106 commented Sep 6, 2018

The same problem described by @mdmorar but I am not using VCPKG, I manage PCL and its dependencies manually:

error C3861: 'pop_t': identifier not found

@mdmorar
Copy link
Author

mdmorar commented Sep 6, 2018

What I did to make it start working until the next iteration of this codebase is the following:
I took the above images "typedef unsigned long long pop_t;" and moved it outside the #define preprocessor definition statements. This way it would instantiate it regardless of #if or #else. For now this should get you guys up and running. I really hope they fix this. This should work regardless of visual studio version in my opinion as its apart of alot of open source VCPKG libraries that depend on it.

Hope this helps.

@RDCH106
Copy link

RDCH106 commented Sep 7, 2018

Yes!

I have applied similar solution using yours as base solution.

Thanks you for sharing

@Evan0327
Copy link

Hello, I got the same problem with PCL, but it seems impossible to modify the dist.h file

@drfknoble
Copy link

drfknoble commented Oct 11, 2018

If FLANN is installed in either Program Files or Program Files (x86), you'll need to run Visual Studio as an Administrator. Program Files and Program Files (x86) are protected and need elevated permissions to edit any of the directories' contents. Hope it helps. I just tried @mdmorar 's fix and it worked for me too.

@Evan0327
Copy link

If FLANN is installed in either Program Files or Program Files (x86), you'll need to run Visual Studio as an Administrator. Program Files and Program Files (x86) are protected and need elevated permissions to edit any of the directories' contents. Hope it helps. I just tried @mdmorar 's fix and it worked for me too.

Thank you very much DrFrazerNobel, I solved the problem.

@MicheleBe
Copy link

I had the same issue and I solve in the same way, moving the definition before the #if

@HuQingsheng520
Copy link

Hi, I got the same problem with PCL 1.9.1 for Visual Studio 2017, but when I took the above images "typedef unsigned long long pop_t;" and moved it outside the #define preprocessor definition statements.It made a new mistake.

@sheikware
Copy link

Late to the game here, but that section just needs to drop sizeof(pop_t) or you get a memory issue. OpenCV has the correct fix in its local implementation.

    HammingLUT lut;
    result = lut(reinterpret_cast<const unsigned char*> (a),
                 reinterpret_cast<const unsigned char*> (b), size);

@K-M-Ibrahim-Khalilullah
Copy link

@mdmorar
Would you specially mention the line number please, where will move the line "typedef unsigned long long pop_t;"

@liuchangji
Copy link

move the "typedef unsigned long long pop_t;" to lines 475 is ok

@mdmorar
Would you specially mention the line number please, where will move the line "typedef unsigned long long pop_t;"

Auturle pushed a commit to Auturle/PCL-Learing that referenced this issue Jul 30, 2020
PCL:1.8.1
vs:2017
点击报错会进入dist.h的文件
根据flann-lib/flann#386
他们说要将将503行的typedef unsigned long long pop_t; 移出if end;
我将503行的typedef unsigned long long pop_t; 移动至475行,报错消失
@JACKDONG-blue
Copy link

Hi, I got the same problem with PCL 1.9.1 for Visual Studio 2017, but when I took the above images "typedef unsigned long long pop_t;" and moved it outside the #define preprocessor definition statements.It made a new mistake.

me,too. How do you solve it?

@Osyotr
Copy link

Osyotr commented Apr 16, 2021

Is project dead?
See opencv/opencv#13270

@JACKDONG-blue
Copy link

Is project dead?
See opencv/opencv#13270
There are still the same mistakes after I corrected them.

@JackBoosY
Copy link

Related microsoft/vcpkg#19170 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.