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

OpenVX 1.3 "typed" constants break build with of OpenVX-based code #58

Open
asmorkalov opened this issue Feb 17, 2025 · 0 comments
Open

Comments

@asmorkalov
Copy link

Platform: Ubuntu 24.04, GCC 13.3
OpenVX build command: python3 Build.py --os=Linux --conf=Release
Example app:

#include <stdio.h>
#include <VX/vx.h>

int main(int, char**)
{
    printf("OpenVX version: %d\n", VX_VERSION);
#if (VX_VERSION => VX_VERSION_1_0)
    printf("New OpenVX\n");
#endif
    return 0;

Error:

gcc ./main.c -I /mnt/Projects/Projects/OpenVX-sample-impl/install/Linux/x64/Release/include/ -o test_c
In file included from ./main.c:2:
./main.c: In function ‘main’:
/mnt/Projects/Projects/OpenVX-sample-impl/install/Linux/x64/Release/include/VX/vx.h:63:41: error: missing binary operator before token "("
   63 | #define VX_VERSION_MAJOR(x) ((vx_uint32)((vx_uint32)(x) & 0xFFU) << 8)
      |                                         ^
/mnt/Projects/Projects/OpenVX-sample-impl/install/Linux/x64/Release/include/VX/vx.h:88:30: note: in expansion of macro ‘VX_VERSION_MAJOR’
   88 | #define VX_VERSION_1_3      (VX_VERSION_MAJOR(1) | VX_VERSION_MINOR(3))
      |                              ^~~~~~~~~~~~~~~~
/mnt/Projects/Projects/OpenVX-sample-impl/install/Linux/x64/Release/include/VX/vx.h:93:30: note: in expansion of macro ‘VX_VERSION_1_3’
   93 | #define VX_VERSION          (VX_VERSION_1_3)
      |                              ^~~~~~~~~~~~~~
./main.c:7:6: note: in expansion of macro ‘VX_VERSION’
    7 | #if (VX_VERSION => VX_VERSION_1_0)
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

1 participant