Compilation finished with exit code 2
Nick-Su opened this issue · 6 comments
Hi! You can compile the code when you set the $GOARCH environment variable to "386". In Powershell on Windows, you enter the following $ENV:GOARCH=386 then it should compile. Note, however, that without the OPCDAAuto.dll you won't be able to use this package. You normally get the DLL with the installation of your OPC server or from the vendor of your OPC server directly and it's either installed on C:\Windows\System32 or C:\Windows\SysWOW64. Hope this answers your questions.
You can download the Graybox DA Automation wrapper for free here.
I have updated the code base so that it works with this wrapper as well, just do a go get -u github.com/konimarti/opc
to get the newest version. However, it is important to keep in mind to use the correct architecture as well, i.e. when you use the Graybox Simulation server set the architecture to 32-bit: $GOARCH=386
.
An exit code 0 indicates that the program terminated correctly. I have never experienced the other behavior you have described though. Do you observe the same when you run the code directly from the command line, i.e. in Powershell?
What you can try is to add opc.Debug()
before the opc.NewConnection
call to print out some more package-related information. Also, is the Graybox Simulation server running? You can check this by looking for gb_opcsim.exe
in the task manager.
Just wanted to check in and ask if you could solve your issue?
Now it works well. The problem is solved. Thanks for asking. Thread can be closed.