Open shakfu opened 2 years ago
Does using go build -ldflags "-r ."
have any effect?
Thanks for your advice.
After deleting cra-go
and running go build -ldflags "-r ."
I get the cra-go
as above: running it does nothing. or it runs and then closes (without explicit errors).
is there any way to switch on logging in cra-go
?
To enable logging in your Go program (cra-go in this case), you can use the log package in Go to print information to the console or write it to a file. Here's a simple example of how you can integrate logging in your
Go code: -
Go code :-
import ( "log" )
Go code :-
func main() { log.Println("Starting cra-go...") // Your existing code... log.Println("Exiting cra-go.") }
If the program runs and then closes without explicit errors, adding logging statements can help you trace the execution flow and identify where it might be encountering issues. You can include log statements in functions, loops, or any part of your code that you suspect might be causing the problem.
After adding logging, re-run your program and check the console output for any log messages. These messages can provide insights into the program's behavior and help you identify the root cause of the issue.
I hope that this will work in your case.
I went to the end of the tutorial and complete building the executable successfully, but the executable fails with an
Reason: image not found
error, basically failing to link to the dylib even though it is copied to the folder in which it resides:I resolved this by the following
but running
./cra-go
after that produces no error but does nothingAny idea what the issue is?