I got here a C library written by someone else, with a very nice way to compile it on a Mac and generate a ruby wrapper.
I am on Windows, and I need to generate a wrapper for .Net. I know absolutely nothing about C or C++.
- I have created a
.i
file that just%include
the.h
file, and used Swig to generate C# files and axxx_wrapper.c
file. - I have created an empty C++ project with Visual Studio 2010, and included all the
.h
and.c
files of the project (except the ones to generate the ruby wrapper) Now when I try to compile, I get a few compilation errors each time there is an inline function:
file.c(54): error C2054: '(' expected after 'inline'
file.c(54): error C2085: 'swap_img' : is not in the formal parameters list
file.c(54): error C2143: syntax error: missing ';' before '{'
I have read here that it might be because VS tries to compile my c files as c++. But how do I do that ? I can't change anything in the code (and I wouldn't try), so I just need to "fix" the project.
Thanks !