Hello World in a fresh project doesn't build but the example does #55
-
|
Hi, I'm able to build the helloworld example when I build it in the examples repo, but when I try to make my own project using the helloworld code I'm getting a bunch of errors. I've double checked my zig version and everything, I'm not sure what I'm doing wrong on my end. log file: main.zig is the same as the example (can't upload a .zig) Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
|
Hi! Thanks for the interest!
What is your build structure? I would assume that you're not including or defining the necessary libraries correctly but it's hard to say without seeing the structure. GitHub supports code blocks but you can also upload the structure to a repository as well if that's easier. |
Beta Was this translation helpful? Give feedback.
-
|
Finally got it working after a bunch of tweaking, thank you again so much! This is my first time using Qt and my first time writing a GUI application in Zig, so I really appreciate all the help you gave me today! |
Beta Was this translation helpful? Give feedback.
You don't need the import structure for things that you're not using. That likely isn't the cause of the fault but it's extra work for no purpose. For just this code, you don't need all the system libraries.
I would suggest taking a step back and reviewing the structure of the examples. Review the build system and what is taking place before trying to reimplement it. If it's easier, start with a fork of the examples and slowly modify it to a single application structure from the multi-application structure that it currently is.