logo       

Strange Problem with SWIG file include: msg#00031

programming.swig

Subject: Strange Problem with SWIG file include

I’m having a strange problem when compiling the SWIG generated c++ file under windows. The VC++ (6.0)  compiler generates so many errors

 

c:\program files\microsoft visual studio\vc98\include\istream(423) : see reference to class template instantiation 'std::basic_istream<_E,_Tr>' being compiled

c:\program files\microsoft visual studio\vc98\include\istream(332) : error C2143: syntax error : missing ')' before '{'

 

c:\program files\microsoft visual studio\vc98\include\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition

 

It looks like per;l.h file (I have active state perl) conflicts with <string> and ACE/ TAO files. My .i file has an entry

 

%{

#include "x.h"

%}

 

x.h has includes to ACE/TAO Corba and <string>

 

The generated file put this x.h entry at the bottom of the file.

 

Surprisingly, If I move this entry above perl.h entry, everything is compiling file.

 

Any answers will be much appreciated.

 

Thanks,

-sanjay

 

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise