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

Windows Platform: Compiling error due to using "and" and "or" and "not" as logical operators instead of using the &&, || and ! notation #420

Closed
princetn opened this issue Nov 25, 2020 · 2 comments

Comments

@princetn
Copy link

There are a couple of files which use "and" and "or" and "not" as logical operators instead of using the &&, || and ! notation. This is an archaic syntax which will prevent someone using Windows from compiling libpointmatcher.
here is what the errors would look like:
Here is the first error:
Severity Code Description Project File Line Suppression State
Error C3927 '->': trailing return type is not allowed after a non-function declarator pointmatcher D:\GIT\libpointmatcher\pointmatcher\DataPointsFilters\SpectralDecomposition.cpp 278
Severity Code Description Project File Line Suppression State
Error C2065 'and': undeclared identifier (compiling source file D:\GIT\libpointmatcher\pointmatcher\DataPointsFilters\Saliency.cpp) pointmatcher D:\GIT\libpointmatcher\pointmatcher\DataPointsFilters\utils\sparsetv.hpp 403

@princetn princetn changed the title Windows Compiling error due to using "and" and "or" and "not" as logical operators instead of using the &&, || and ! notation Windows Platform: Compiling error due to using "and" and "or" and "not" as logical operators instead of using the &&, || and ! notation Nov 25, 2020
@yokoshou
Copy link

/quick manual/
0.Open Project Property.
1.Click the C/C++ folder.
2.Click the Advanced property page.
3.Modify the Forced Include File property. (add iso646.h)

/Detail about this problem/

I was in the same problem and I research about it.

It may be caused by Visual Studio Language Extensions.

If you just want to disable this function, you need to
1.choose Configuration Properties > C/C++ > Language.
2.modify the Disable Language Extensions property.

But it doesn't work in this case.
Because the Boost thread function needs Language Extensions.

So another way to solve this problem is to add #include<iso646.h>.
I'm tired of searching which file needs to <iso646.h>, so I using Name Forced Include File.

1.Click the C/C++ folder.
2.Click the Advanced property page.
3.Modify the Forced Include File property. (add iso646.h)

good luck!

@maximecharriere
Copy link
Contributor

Thank's @yokoshou, it worked for me !
Can't we make this mistake not happen anymore?

georges-chahine pushed a commit to georges-chahine/libpointmatcher that referenced this issue Sep 10, 2023
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

No branches or pull requests

4 participants