On Sat, Nov 15, 2014 at 06:27:22PM -0800, __kaveh__ wrote:
> I can not get it to work (Windows 7 x64, MinGW x86, Go x86; LiteIDE); I get
> this error:
>
> .\swejpl.c:78:19: error: conflicting types for 'off_t'
> typedef __int64 off_t;
This doesn't look like a cgo issue but more like an issue with your C
code. It's correct that you don't need to call go tool cgo manually. Go
install will handle it. You need to give it valid C code, though.
Don't bother with cgo until you can compile your C code using the
C compiler.
As the compiler says, your code defines off_t multiple times using
conflicting types. One of those comes from a standard header
(sys/types.h) shipped with MinGW. Remove the typedef from your code or
make the definitions agree (is there something like _FILE_OFFSET_BITS=64
on windows?).
Is this swejpl.c file the one found here:
http://www.astro.com/ftp/swisseph/src/swejpl.c
It has the incriminated text on line 78, shoved behind an "#if MSDOS".
Find out if it belongs there and what is the appropriate thing to do for
your system.