On Fri, Aug 15, 2014 at 12:48 AM, Alexander Shopov <li...@kambanaria.org> wrote:
>
> The symbol/assembler name (I do not know what is the right word) that
> is generated in the .h header file is:
> extern int Cgoexp_Dummy (int p0)
> __asm__("cgo_problem_example_com_demo.Cgoexp_Dummy");
>
> The symbol that exists in the object file is:
> cgo_problem_example.com_demo.Cgoexp_Dummy
> -------------------^

Normally the first name looks more right.  The problem is some
confusion over how to handle a package name that contains a '.'--in
your case, example.com.  The go tool will be passing a -fgo-pkgpath
option to gccgo and a -gccgopkgpath option to cgo.  You can use "go
build -x" to see the exact commands being run.  First make sure that
those options are the same.  If they are the same, either gccgo or cgo
is handling the option differently--it looks like one is convert the
'.' to '_' and the other is not.  They need to do the same thing.

Ian

Reply via email to