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

"VEZ.h" has unknown type name errors? #62

Open
ReallyComeOn opened this issue Jan 15, 2019 · 7 comments
Open

"VEZ.h" has unknown type name errors? #62

ReallyComeOn opened this issue Jan 15, 2019 · 7 comments

Comments

@ReallyComeOn
Copy link

When including the header file "VEZ.h" in a C source file, the compiler (GCC) will spit out a few unknown type name errors.

This ONLY happens in C files, not C++ files (not sure why).
Anyways a cheap fix is to add 'struct' in front of the unknown type names.

@manhnt9
Copy link

manhnt9 commented Jan 15, 2019

Could you paste the exact error output of the compiler?

@ReallyComeOn
Copy link
Author

Here's the output:

In file included from ../src/main.c:2:
../include/vez/VEZ.h:178:11: error: unknown type name ‘VezMemberInfo’
 const VezMemberInfo* pNext;
       ^~~~~~~~~~~~~
../include/vez/VEZ.h:179:11: error: unknown type name ‘VezMemberInfo’
 const VezMemberInfo* pMembers;
       ^~~~~~~~~~~~~
../include/vez/VEZ.h:395:11: error: unknown type name ‘VezAttachmentInfo’
 const VezAttachmentInfo* pAttachments;
       ^~~~~~~~~~~~~~~~~
In file included from ../src/main.c:2:
../include/vez/VEZ.h:573:60: error: unknown type name ‘VezMultisampleState’
 VKAPI_ATTR void VKAPI_CALL vezCmdSetMultisampleState(const VezMultisampleState* pStateInfo);
                                                        ^~~~~~~~~~~~~~~~~~~
../include/vez/VEZ.h:574:61: error: unknown type name ‘VezDepthStencilState’
 VKAPI_ATTR void VKAPI_CALL vezCmdSetDepthStencilState(const VezDepthStencilState* pStateInfo);

@manhnt9
Copy link

manhnt9 commented Jan 16, 2019

A minimal example would help the debugging. If you could, please make a .zip containing a single file that causes the problem and post it with GCC command or Makefile/CMake/etc so a developer could build and try fixing easily.

@ReallyComeOn
Copy link
Author

Just create a 'main.c' file and add the line '#include "VEZ.h"'.
Then run:

gcc main.c -o main

Also, compiling with CLANG yields the exact same result.

@manhnt9
Copy link

manhnt9 commented Jan 16, 2019

I'm afraid that this problem is out of scope, because most V-EZ's code is C++. And you can't compile as C code since C doesn't have class keyword. So it's not possible to use V-EZ in C-only environment I think.

@ReallyComeOn
Copy link
Author

V-EZ's lib (.so) works perfectly with only C.

The header file just has a few small mistakes with certain typedefs.

@ForestCSharp
Copy link

ForestCSharp commented Apr 14, 2020

I got V-EZ compiling for my V-EZ rust bindings. Could be useful for this issue: #71

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

3 participants