Just wondering, is there any chance that I didn't place some file in the correct place? The directory tree is as follows, ├── bin ├── example │ └── COLOR_test │ ├── COLOR_test.cpp │ └── SessionKey.hpp ├── include │ └── COLOR.h ├── lib │ ├── libboost_filesystem.a │ ├── libCOLOR.a │ └── libxml2.a ├── libcolor ├── libcolor.go ├── libcolor.swigcxx ├── README
When I issue `go build -x`, go and swig insists to generate another libcolor.go file in the tmp $WORK directory, thus none of the directives defined in above libcolor.go file is picked up. Any help will be appreciated. Thanks, Chun On Tuesday, February 28, 2017 at 2:49:19 PM UTC-5, Chun Zhang wrote: > > Thank you for your reply! I read a few posts between you and Stephen > before posting this. > > Sorry, it was a bad copy and paste. > > I did have the import "C" line in the file. But I have the same error. > > I can "go build libcolor.go" itself with no error. But that does not seem > to build the whole library. > > Best Regards, > Chun > > On Tuesday, February 28, 2017 at 2:44:21 PM UTC-5, Ian Lance Taylor wrote: >> >> On Tue, Feb 28, 2017 at 11:04 AM, Chun Zhang <[email protected]> wrote: >> > >> > An empty libcolor.go file with the following lines was manually created >> > >> > --------------------------- >> > package libcolor >> > >> > // #cgo CFLAGS: -I . >> > // #cgo CXXFLAGS: -std=c++11 <--- this does not seem to work >> > // #cgo LDFLAGS: -L${SRCDIR}/lib/ -lCOLOR.a -lz <--- this is placed at >> the >> > correct place >> >> Note that this is only effective if those comments appear directly >> before an `import "C"` line. >> >> Ian >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
