-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
C Builder error #21026
Comments
#flag -luvc
#include <libuvc/libuvc.h>
@[typedef]
struct C.uvc_frame_t {
}
type FnFrameCB = fn (frame &C.uvc_frame_t)
fn main() {
println('Hello?')
} This compiles cleanly for me, after I installed https://github.com/libuvc/libuvc . Note the |
On the C side: typedef struct uvc_frame {
...
} uvc_frame_t; (from https://github.com/libuvc/libuvc/blob/master/include/libuvc/libuvc.h#L455) |
Can be closed @Eliyaan ? |
No, it shouldn't be closed, yet, since the original issue is still a problem. Having a workaround is good, but V should always catch and report errors (if it can), instead of letting the C compiler find them. In this case, V should probably have reported that the typedef struct name didn't end in |
Afaik this is not something the V can figure out. |
It can figure out that the However, I don't know if that's a universal rule or not. If not, then yes, this should simply be closed. Otherwise, this check should be added. |
From the C I can see (not much) it is not an universal rule, so I'm closing the issue. |
Describe the bug
The program outputs a C builder error.
Reproduction Steps
Expected Behavior
It not to output a C builder error.
Current Behavior
Possible Solution
No response
Additional Information/Context
(using libuvc)
V version
V 0.4.4 673a2f4.0a9d1f9
Environment details (OS name and version, etc.)
V full version: V 0.4.4 673a2f4.0a9d1f9
OS: linux, Linux version 6.6.13-200.fc39.x86_64 (mockbuild@72f11b2996ed4699b0f705186172808f) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld version 2.40-13.fc39) #1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024
Processor: 4 cpus, 64bit, little endian, Intel(R) Pentium(R) Gold 7505 @ 2.00GHz
getwd: /home/nopana/projects/cnn_dataset/movenet
vexe: /home/nopana/v/v
vexe mtime: 2024-03-14 18:35:56
vroot: OK, value: /home/nopana/v
VMODULES: OK, value: /home/nopana/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.43.0
Git vroot status: weekly.2024.09-60-g0a9d1f9d
.git/config present: true
CC version: cc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: