I'm trying to compile the swiss ephemeris source files (astronomical calculations for determining planetary positions) to create a DLL. The documentation (
http://www.astro.com/swisseph/swephprg.htm) clearly states that the code is Ansi C and in most cases the user will compile a linkable or shared library from the source code, using his favorite C compiler, and then link this library with his application.
If the user programs in C, he will only need to include the header file swephexp.h with his application; this in turn will include sweodef.h. All other source files can ignored from the perspective of application development.
So I downloaded the files and tried to compile them using Pelles C compiler with the /Ze option turned on
but I'm still getting
C:\Program Files\PellesC\Include\Win\objidl.h(2261): fatal error #2210: More than 100 errors, please improve yourself.
If you are compiling a Windows program, make sure you use the /Ze option!
It doesn't matter what file I try to compile, the errors always start with the following lines:
C:\Program Files\PellesC\Include\Win\objidl.h(500): error #2001: Syntax error: expected '}' but found 'COAUTHINFO'.
C:\Program Files\PellesC\Include\Win\objidl.h(502): error #2156: Unrecognized declaration.
C:\Program Files\PellesC\Include\Win\objidl.h(502): warning #2099: Missing type specifier; assuming 'int'.
C:\Program Files\PellesC\Include\Win\objidl.h(1016): error #2001: Syntax error: expected '}' but found 'COSERVERINFO'.
C:\Program Files\PellesC\Include\Win\objidl.h(1017): error #2156: Unrecognized declaration.
I attached the the swetest.c file and the two header files needed to reproduce the errors. I'm using the latest 7.0 version of the Pelles C compiler.
I have successfully used Pelles C with most of my other C programs and found it a fantastic compiler and I'm now stuck as I cannot link in these source files for my project. Would really appreciate some pointers on how to fix this problem
Thanks in advance for any help.