You must not use #define for constants, that's C approach, it's wrong to do so in C++. Just use constants, and SWIG will do the rest.

2013/6/19 Александр Емельянов <cbsman@mail.ru>
Please tell me How the swig can help me to use #define derectives from C/C++ in C#


Среда, 19 июня 2013, 13:44 +07:00 от michael kapelko <kornerr@gmail.com>:
#define is not a constant, it's a preprocessor directive.
Constant is:
const int my_const = 5;

2013/6/19 Александр Емельянов <cbsman@mail.ru>
Please, help me undestand how I can translate constants from C++ to C# with swig. I am try #define my_const 5 (for example). What I need write in interface file for access this constant from C#. Thank you.


--
Александр Емельянов

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Swig-user mailing list
Swig-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user




--
Александр Емельянов