Skip to content

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

@asmorkalov

Description

@asmorkalov

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions