-
Notifications
You must be signed in to change notification settings - Fork 5
Troubleshooting
Following these steps will in most cases resolve your issues.
If you can't seem to find a solution to your problem contact me on DiscordTimo9.
[...]\altv-go\base_object.go:3:11: fatal error: capi.h: No such file or directory
This error occurs when the c-api is not built or the header file is not in the correct location.
Should be solved by using the new cmd/gencapi. Otherwise try building the capi again.
[...]/x86_64-w64-mingw32/bin/ld.exe: cannot find -ldl: No such file or directory \ collect2.exe: error: ld returned 1 exit status
You are missing the libdl.a library. This library is required to build the module on windows.
If you are using mingw-w64 you can install the package mingw-w64-dlfcn which contains the libdl.a library.
Take a look at the Requirements Guide for instructions on how to install mingw-w64.
-buildmode=c-shared requires exactly one main package
You are probably running the go build command in the wrong directory.
Make sure you are in the root directory of your resource (where your go.mod is located).
[Error] Failed to open main file
Make sure your resource.toml looks something like this:
type = 'go'
main = 'my-resource.dll'DO NOT set main path to a .go file. It must be a shared library - a .dll or .so file.
You should have built your resource with the go build -o [resource-name].so -buildmode=c-shared command previously.
Set the path to that [resource-name].so output file as the main path in your resource.toml file.
You encountered a problem 💥? Check out the Troubleshooting Guide!
If you can't find a solution there file a new issue in this repository or contact me on Discord.