Hi Ian,
Here is the build output --
FYI -- The path: /<path>/goLang/goCode/src/eventbridge/EventBridge.c was where I had compiled the C library using the gcc toolchain. I copied this compiled library to my project and statically linked it.
Path to my project is at /<path>/goLang/goCode/src/agent/
>pwd
/<path>/goLang/goCode/src/agent
>echo $GOPATH
/<path>/goLang/goCode
>go version
go version go1.7.1 linux/amd64
>gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=
http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
>go build
# agent
/<path>/goLang/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/<path>/tmp/go-link-022070709/000001.o: In function `putStringToBuffer':
/<path>/goLang/goCode/src/eventbridge/EventBridge.c:31: multiple definition of `putStringToBuffer'
/<path>/tmp/go-link-022070709/000000.o:/<path>/goLang/goCode/src/eventbridge/EventBridge.c:31: first defined here
/<path>/tmp/go-link-022070709/000001.o: In function `ReceiveEventBuffer':
/<path>/goLang/goCode/src/eventbridge/EventBridge.c:446: multiple definition of `ReceiveEventBuffer'
/<path>/tmp/go-link-022070709/000000.o:/<path>/goLang/goCode/src/eventbridge/EventBridge.c:446: first defined here
/<path>/tmp/go-link-022070709/000001.o: In function `getStringFromBuffer':
/<path>/goLang/goCode/src/eventbridge/EventBridge.c:37: multiple definition of `getStringFromBuffer'
/<path>/tmp/go-link-022070709/000000.o:/<path>/goLang/goCode/src/eventbridge/EventBridge.c:37: first defined here
:
:
:
goes to point out multiple declaration error for each of the function defined in the library LIBA
Thanks!
Sriram