Open caronoff opened 3 years ago
I think I might have fixed the issue w/ Swig 4.0.2 compatibility. Give it a try? Some pull requests for better testing would be appreciated... :)
Thank you for the fast fix but I think my problem is specific.
I am using Python 3.8 and the python setup.py install succeed to launch SWIG but SWIG craps out! Maybe a bad C++ compiler or unable to read the rs_base file in certain lines/ Error: error: C:\Users\caronoff\PycharmProjects\bchTest\ezpwd-reed-solomon\c++\ezpwd\rs_base(451): warning C4067: unexpected tokens following preprocessor directive - expected a newline C:\Users\caronoff\PycharmProjects\bchTest\ezpwd-reed-solomon\c++\ezpwd\rs_base(454): fatal error C1021: invalid preprocessor command 'warning' command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2
OK, I've removed the #warning pre-processor directive that Visual Studio seems to be having trouble with...
OK, I've removed the #warning pre-processor directive that Visual Studio seems to be having trouble with...
Thank you for being so responsive! I am getting warmer now. Still failing at setup with this error now:
C:\Users\caronoff\PycharmProjects\bchTest\ezpwd-reed-solomon\c++\ezpwd\rs_base(451): warning C4067: unexpected tokens following preprocessor directive - expected a newline C:\Users\caronoff\PycharmProjects\bchTest\ezpwd-reed-solomon\c++\ezpwd\rs_base(1322): warning C4067: unexpected tokens following preprocessor directive - expected a newline ../../c++\ezpwd/ezcod(620): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data ../../c++\ezpwd/ezcod(568): note: while compiling class template member function 'int ezpwd::ezcod<3,9>::decode(const std::string &)' ezcod/ezcod_wrap.cpp(7645): note: see reference to function template instantiation 'int ezpwd::ezcod<3,9>::decode(const std::string &)' being compiled ezcod/ezcod_wrap.cpp(3320): note: see reference to class template instantiation 'ezpwd::ezcod<3,9>' being compiled ../../c++\ezpwd/ezcod(644): error C2065: 'M_PI': undeclared identifier ../../c++\ezpwd/ezcod(645): error C2065: 'M_PI': undeclared identifier ../../c++\ezpwd/ezcod(645): error C2065: 'M_PI': undeclared identifier error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2
So apparently, file ezcod needs a line in header
as per this https://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier
However, Windows Visual studio still craps out when compiling. I am not sure where the log file is to attach but theres a long dump of warnings. Then, there is the followoing errors below. I guess the platform for Windows VC tools has changed alot and broken the compatibility of the compiler since 2 years ago.
++\ezpwd/serialize(368): error C2181: illegal else without matching if
../../c++\ezpwd/serialize(368): error C2146: syntax error: missing ')' before identifier 'and'
../../c++\ezpwd/serialize(368): error C2065: 'and': undeclared identifier
../../c++\ezpwd/serialize(368): error C2146: syntax error: missing ';' before identifier 'pad'
../../c++\ezpwd/serialize(368): error C2059: syntax error: ')'
../../c++\ezpwd/serialize(369): error C2677: binary '': no global operator found which takes type 'I' (or there is no acceptable conversion)
with
[
I=std::_String_iterator<std::_String_val<std::_Simple_types
Do you think I should try it on an Ubuntu machine and if so what version of Swig did you use successfully to compile the Python interface?
Thanks
On Fri., Nov. 13, 2020, 3:11 p.m. Perry Kundert, notifications@github.com wrote:
OK, I've removed the #warning pre-processor directive that Visual Studio seems to be having trouble with...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pjkundert/ezpwd-reed-solomon/issues/16#issuecomment-727007594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5KN47QF6KENTSITTJCQRDSPWHH3ANCNFSM4TU5NSSA .
Swig wrapper compiling not working. I tried on Win10 and Mac 10.15. Has anyone succeeded in getting this to work in Python?