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

Error when using duarteroso.glfw #23648

Open
ZigyZaya opened this issue Feb 3, 2025 · 1 comment
Open

Error when using duarteroso.glfw #23648

ZigyZaya opened this issue Feb 3, 2025 · 1 comment

Comments

@ZigyZaya
Copy link

ZigyZaya commented Feb 3, 2025

V version: V 0.4.9 319eb83, press to see full `v doctor` output
V full version V 0.4.9 b8c7892.319eb83
OS windows, Microsoft Windows 11 Pro 22621 64-bit
Processor 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz
Memory 7.03GB/15.87GB
V executable C:\Users\User\Documents\v_windows\v\v.exe
V last modified time 2025-02-03 18:32:50
V home dir OK, value: C:\Users\User\Documents\v_windows\v
VMODULES OK, value: C:\Users\User.vmodules
VTMP OK, value: D:\Temp\Temp\v_0
Current working dir OK, value: D:\Files\Projects\vtest
Git version git version 2.39.1.windows.1
V git status weekly.2025.05-10-g319eb835
.git/config present true
cc version N/A
gcc version gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r2) 14.2.0
clang version (built by Brecht Sanders, r2) clang version 19.1.1
msvc version N/A
tcc version tcc version 0.9.27 (x86_64 Windows)
tcc git status N/A
emcc version N/A
glibc version N/A

What did you do?
./v -g -o vdbg cmd/v && ./vdbg src/main.v && D:\Files\Projects\vtest\src\main.exe

module main


import duarteroso.glfw

fn main() {
	if C.glfwInit() == glfw.glfw_false {
		exit(-1)
	}

	window := C.glfwCreateWindow(640, 480, 'Hello World'.str, unsafe { nil }, unsafe { nil })
	if isnil(window) {
		C.glfwTerminate()
		exit(-1)
	}

	C.glfwMakeContextCurrent(window)

	for C.glfwWindowShouldClose(window) == glfw.glfw_false {
		C.glfwSwapBuffers(window)
		C.glfwPollEvents()
	}
}

What did you see?

================== C compilation error (from tcc): ==============
cc: D:/Temp/Temp/v_0/main.01JK6J3P1CB7PMYN6NEBRERRWJ.tmp.c:532: warning: WINVER redefined
cc: D:/Temp/Temp/v_0/main.01JK6J3P1CB7PMYN6NEBRERRWJ.tmp.c:1028: error: ';' expected (got "duarteroso__glfw__GLFWmonitor")
=================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .

What did you expect to see?

This should open a window using GLFW. I have it installed on my computer (via chocolatey) and i did set it on path.

if u have another lib that does GLFW/OpenGL stuff (im working in a game engine), please tell me!

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.

Copy link

Connected to Huly®: V_0.6-22069

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