Quantcast

How to handle redefinition of a MACRO

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to handle redefinition of a MACRO

shreeganesh hegde
Hi,
My C code is like bellow.

// file.c
#include<stdio.h>
#define value 10
#define value 20

void  func()
{
      printf("%d\n",value);
}


My Interface file is like bellow.

//sample.i
%module sample
%{
           #include "func.c"
%}
%include "func.c"



When I run the command  "swig -python sample.i", I am getting the error like bellow.
Macro 'value' redefined. The previous declaration for  'value'  is there.

How to handle this?

Thank You


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...