[go-nuts] Re: How to force cgo to use C++ compiler (g++) instead of gcc ?

2021-11-01 Thread Andy Polyakov
Hmm, previous suggestion to use '#cgo CFLAGS: -x c++' doesn't seem to work all the way. [I've only tested class declarations at the time.] Trouble is that '-x c++' is passed even when compiling the glue code, so that even glue symbols get decorated, which doesn't fly with linker at the end. I s

[go-nuts] Re: How to force cgo to use C++ compiler (g++) instead of gcc ?

2021-11-01 Thread Andy Polyakov
> lib.go > -- > package lib > > // #cgo CFLAGS: -x c++ > // #include "cpplib/file.cpp" > // #include "cpplib/wrapper.cpp" > import "C" > Formally, the remaining question is if C compilers on all of your target platforms support -x option. In the worst case, if some does not, you