You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
When writing small wrapper functions for cgo directly in the comment above import
"C", it's useful if cgo could produce all the output from gcc in case of an
error. For this code:
/*
#include <stdio.h>
#include <infiniband/verbs.h>
struct ibv_device **my_ibv_get_device_list(int *num_devices) {
struct ibv_device** devs = ibv_get_device_list(num_devices);
printf("devs=%p\n", devs);
printf("devs[0].node_type=%d\n", *devs[0].node_type);
return devs;
}
*/
import "C"
I get:
gcc produced unexpected output:
<stdin>: In function 'my_ibv_get_device_list':
so I know something is wrong in my little wrapper, but I don't know what.
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux
Which revision are you using? (hg identify)
tip
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: