Skip to main content
5 votes
1 answer
107 views

I am trying to use the PETSc (Portable, Extensible Toolkit for Scientific Computation) library in Go over cgo. After the call of PetscInitialize, the program will crash at a random point with the ...
Fabian's user avatar
  • 81
2 votes
1 answer
186 views

I want to call a go function from C++ and return a string. The function: //export EditStr func EditStr(a string) (ostr string) { ostr = fmt.Sprintf("[["+a+"]]") fmt....
Raphael Grimm's user avatar
1 vote
0 answers
89 views

macOS: The dynamically loaded .dylib cannot read environment variables that were set by the main Rust process at runtime Windows: The same code works perfectly - the .dll can access environment ...
leibuyun's user avatar
4 votes
0 answers
65 views

For testing the callas PDF toolbox SDK, I want to convert a sample PDF to a PNG. The callas license is activated. In my main() function, I successfully initialize the SDK. After that, I call the ...
donatellot_123's user avatar
1 vote
1 answer
158 views

Background I am currently using a DLL I generated with golang in python. As a sanity check for debugging I added a function called return_string(), which takes a pointer to a string in C (char*) ...
Kieran Wood's user avatar
  • 1,481
0 votes
1 answer
92 views

I am working with cgo, I have a parameter that's being passed in as a *C.char. Once it's been used in a function call I no longer need it, so I defer freeing it, but when I do I don't get a result ...
Kieran Wood's user avatar
  • 1,481
1 vote
2 answers
141 views

I'm trying to compile a Go native binary to use in Java code on Mac. The binary needs to be executed on a linux host which has the following specifications: # uname -a Linux <hostname> 5.14.0-...
scottstots's user avatar
3 votes
1 answer
285 views

I'm building a Go application with native (CGO_ENABLED=1) SQLite support using https://github.com/mattn/go-sqlite3. I'm trying to get the builder docker image to a reasonable size. (goreleaser/...
user3277119's user avatar
2 votes
1 answer
79 views

I have a file written in C with the format "header.h", and I want to read it using CGO to automatically retrieve the field names defined in header.h. Here is a shortened example where I ...
Daniel YC Lin's user avatar
0 votes
1 answer
122 views

I have written a linux service in Go that processes a large number of image files, converting them from TIFF to JPEG and adding a text overlay on top. I'm using the Go package gographics/imagick/v3 ...
Jim's user avatar
  • 45
2 votes
1 answer
221 views

I'm still on the learning curve with Go, but I've managed to compile and run a Go program that includes a C object file. The objective is to call an existing static C++ library. The call will be a bit ...
winwaed's user avatar
  • 7,820
0 votes
0 answers
374 views

I am quite new to golang, and I am doing some experiments with golang and cgo. I wanted to see if golang can benefit with a C program that uses SIMD operations on a simple test, however what I saw is ...
Ilian Zapryanov's user avatar
2 votes
0 answers
86 views

I'm using https://github.com/gen2brain/aac-go.git to encode AAC in my golang project, but sometimes I got crash in my ARMV7l linux and I have executed like CGO_DEBUG=1 GOTRACEBACK=crash ./binary to ...
Cat Tom's user avatar
  • 86
0 votes
0 answers
193 views

I am working on a GO project that links to a shared library (.so) using CGO. I want to embed the library path in the binary using rpath,so that it runs without needing to set the LD_LIBRARY_PATH. ...
ray an's user avatar
  • 1,280
1 vote
1 answer
192 views

I have to switch to windows for a week and I cant run my project I installed GCC via Cygwin and added it to path, I can call it from any shell. I set CGOENABLED=1 because it was required but I keep ...
Vojin Purić's user avatar
  • 2,395

15 30 50 per page
1
2 3 4 5
62