Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-10 Thread Ian Lance Taylor
On Mon, Jun 10, 2019 at 7:44 AM Nitish Saboo wrote: > > Does the successful compilation makes sure that the Go code is properly > linked to the C header files ? I'm sorry, I don't know how to answer that question. Does your program run as expected? The `ldd` program will show the set of

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-10 Thread Nitish Saboo
Hi Ian On Sat, Jun 8, 2019 at 12:21 PM Nitish Saboo wrote: > Hi Ian, > > So I observed a very strange thing.If I leave it out completely then also > the project gets compiled. > I thought that linker file is binding my Go code to the C code.Why am I > not getting any error ? > How the Go code

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-10 Thread Nitish Saboo
Hi Ian, Does the successful compilation makes sure that the Go code is properly linked to the C header files ? Thanks, Nitish On Sat, Jun 8, 2019 at 12:21 PM Nitish Saboo wrote: > Hi Ian, > > So I observed a very strange thing.If I leave it out completely then also > the project gets

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-08 Thread Nitish Saboo
Hi Ian, So I observed a very strange thing.If I leave it out completely then also the project gets compiled. I thought that linker file is binding my Go code to the C code.Why am I not getting any error ? How the Go code is then getting linked to the C code ? Compiled Succesfully

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-08 Thread Ian Lance Taylor
On Fri, Jun 7, 2019 at 8:59 PM Nitish Saboo wrote: > > I have tried the following three scenarios and one of them compiles > successfully that is with -L option. > Let me know If am I missing something here . You should use what works, although I don't know why it works. I would have thought

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-07 Thread Nitish Saboo
Hi Ian, I have tried the following three scenarios and one of them compiles successfully that is with -L option. Let me know If am I missing something here . *1)When I use the this I get the following error:* package lib //#cgo CFLAGS: -I./syslog-ng-3.6.2/ //#cgo LDFLAGS:

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-07 Thread Ian Lance Taylor
On Fri, Jun 7, 2019 at 9:53 AM Nitish Saboo wrote: > > > //#cgo CFLAGS: -I./syslog-ng-3.6.2/ > > //#cgo LDFLAGS: -L$(SRCDIR)/syslog-node.so. < > > Is this what you are saying? > Btw..do I need to keep -L flag? I'm suggesting that you try //#cgo LDFLAGS: ${SRCDIR}/syslog-node.so

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-07 Thread Nitish Saboo
Hi Ian, > //#cgo CFLAGS: -I./syslog-ng-3.6.2/ > //#cgo LDFLAGS: -L$(SRCDIR)/syslog-node.so. < Is this what you are saying? Btw..do I need to keep -L flag? Thanks, Nitish On Fri, 7 Jun 2019, 19:07 Ian Lance Taylor, wrote: > On Fri, Jun 7, 2019 at 4:03 AM Nitish Saboo >

Re: [go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-07 Thread Ian Lance Taylor
On Fri, Jun 7, 2019 at 4:03 AM Nitish Saboo wrote: > > //#cgo CFLAGS: -I./syslog-ng-3.6.2/ > //#cgo LDFLAGS: syslog-node.so. < Try using ${SRCDIR}/syslog-node.so, since you are creating the shared library in the source directory. Ian -- You received this message because you

[go-nuts] Need Assistance: makefile failing at 'go build' step

2019-06-07 Thread Nitish Saboo
Hi, syslogparse.go --- *** package lib //#cgo CFLAGS: -I./syslog-ng-3.6.2/ //#cgo LDFLAGS: syslog-node.so. < //#cgo LDFLAGS: -L/usr/local/lib/ -lsyslog-ng //#cgo LDFLAGS: -L/usr/local/lib/syslog-ng -ldbparser //#cgo