Linux golang inegration of TA looks not working

Hi, I used your example for go version to compile my program in Ubuntu x64. First I needed to make some changes to your files turboactivate.go and turboactivate_unix.go, because files didn't compiled. It requried to add 2 include statements: #include <stdlib.h>#include <stdio.h>and to change line " type TAStrPtrType *C.CHAR "to " type TAStrPtrType *C.char "

Then I added just simple lines from example to my program (main.go):"import ( "golang.wyday.com/turboactivate")var isGenuine = falseconst daysBetweenChecks = 14const gracePeriodDays = 7

func main() { ta, err := turboactivate.NewTurboActivate("db2h7lwdqsrwnjvbfgj2rdr474$ if err != nil { panic(err) }

isGr, err := ta.IsGenuineEx(daysBetweenChecks, gracePeriodDays, true,$ if err != nil { panic(err) } if isGr == turboactivate.IGRGenuine || isGr == turboactivate.IGRGenuineFeaturesChanged || isGr == turboactivate.IGRInternetError { isGenuine = true }

//my program cmd.Execute(version)}

Compiled it to binary, added 'libTurboActivate.so' file to the same directory and run it.

And it fails to find 'libTurboActivate.so' with error: " error while loading shared libraries: libTurboActivate.so: cannot open shared object file: No such file or directory"

This looks like the 'libTurboActivate.so' file you put into package is wrong version and not for x64 linux. Could you please check this.

Hey Peter,

We'll look into those changes.

Regardin the libTurboActivate.so not being loaded, you'll have to modify the LDFLAGS in turboactivate.go like so:

#cgo LDFLAGS: -L . -L .. -Wl,-rpath=\$ORIGIN -lTurboActivate

We'll see if we can update the examples / article to make this clearer.

Hi Wyatt, this helped, thank you! Yes, this info should be in example. I continue to set up TA. Should be working soon 🙂

I also had to change the 2 occurrences of "C.STRTYPE" in turboactivate.go to "*C.char".

It seems that golang support isn't that great...

>> "It seems that golang support isn't that great..."

We've created articles, a subdomain on wyDay, example source code, etc. The support is pretty darn good. We've made extra efforts to make TurboActivate fit the "golang way of doing things".

The Unix example worked on the golang version when we first released it. Golang is a shifting language with good(ish) backwards compatibility. Unfortunately they broke something in one of the releases they made since we first released the example.

We'll fix the Unix example in an upcoming update.