From: Paul F. <fer...@ho...> - 2009-02-23 10:52:47
|
wsfulton wrote: > > Fergus, Paul wrote: >> Dear All, >> >> I am trying to use a header file for a dll I want to use in Java. Based >> on the tutorial I have simple made a reference to the header file in the >> interface file - here is the interface file. >> >> %module example >> %{ >> /* Includes the header in the wrapper code */ #include "xsenscmt.h" >> %} >> >> /* Parse the header file to generate wrappers */ %include "xsenscmt.h" >> >> The header file can be found at >> http://www.tocaloshi.co.uk/code/xsenscmt.h (it was too big to post to >> this forum). This header file is provided by XSENS - a motion capturing >> product. >> >> I use the following command line and I get the following errors: >> >> C:\Users\tocaloshi\Documents\JNIProjects\XSENS_JNI_DLL\CMT Example >> Dll>swig -jav a xsenscmt.i >> xsenscmt.h(367): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> xsenscmt.h(382): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> xsenscmt.h(403): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> xsenscmt.h(427): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> xsenscmt.h(454): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> xsenscmt.h(484): Error: CPP #error ""Platform not supported"". Use the >> -cpperras warn option to continue swig processing. >> > The most important thing is SWIG does not follow #include by default, > which is the ultimate reason why you get these errors. This is by design > and SWIG usually generates platform independent code. You need to decide > on the system specific information in this header file and set up the > appropriate macros to get what you want. You could try %include > <stdint.i>. stdint.i provides the necessary type information for SWiG > that stdint.h provides a C/C++ compiler. > >> Could anyone see if they can swig the attached header file. >> >> My platform is Windows Vista Home Premium. >> >> Thank you in advance for your time and effort. >> >> Kind Regards, >> >> Paul >> >> P.S. Would I have the same problem if I used Windows XP to swig the file? > Unlikely to make any difference as the code you are feeding SWIG is > identical as SWIG does not follow #include files unless you tell it to. > > William > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > > Hi William Thank you for your reply. You mentioned setting up Macros to include the header files inside xsenscmt.h. I am new to SWIG and have not done this before. Would you have a simple example of how I can set up a simply macro to include the header files. Thank you in advance for your time and effort. Kind Regards, Paul -- View this message in context: http://www.nabble.com/Platform-not-supported-errors-when-trying-to-Swig-XSENS-header-file-tp22057664p22159239.html Sent from the swig-user mailing list archive at Nabble.com. |