Menu

#19 Support ISO c++

9.20-2.00beta
closed-fixed
nobody
None
5
2020-10-25
2016-02-26
No

Rewritten UnicodeHelper doesn't compile with ISO C++.

Thank you Boris - I tried the "try2" branch and got a compile error when building (see below).  

However, in desperation, I tried the other git branch "migrate-to-15.09" and that one managed to build.  it appears to be working for me here, too.  Is it okay for me to use?

many thanks for your quick help on this

$ make
[ 1%] target
[ 1%] Built target sevenzipjbinding-jar
[ 1%] javah: generating h-files from java classes net.sf.sevenzipjbinding.SevenZip;net.sf.sevenzipjbinding.impl.InArchiveImpl;net.sf.sevenzipjbinding.impl.OutArchiveImpl
[ 2%] Building CXX object jbinding-cpp/CMakeFiles/7-Zip-JBinding.dir/JNITools.cpp.o
In file included from /nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/JNITools.cpp:3:
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:12: error: ISO C++ forbids initialization of member âptrâ
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:12: error: making âptrâ static
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h: In instantiation of âWithStackBuffer<short unsigned="" int="">â:
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:38: instantiated from here
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:12: error: invalid in-class initialization of static data member of non-integral type âshort unsigned intâ
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h: In instantiation of âWithStackBuffer<wchar_t>â:
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:98: instantiated from here
/nfs/nastaff/src/netaffx/job_server/SevenZipJBinding-migrate-to-15.09-try2/jbinding-cpp/UnicodeHelper.h:12: error: invalid in-class initialization of static data member of non-integral type âwchar_t
â
make[2]: [jbinding-cpp/CMakeFiles/7-Zip-JBinding.dir/JNITools.cpp.o] Error 1
make[1]:
[jbinding-cpp/CMakeFiles/7-Zip-JBinding.dir/all] Error 2
make: *** [all] Error 2
~~~~

https://sourceforge.net/p/sevenzipjbind/discussion/757965/thread/555d6f1b/?limit=25#2b04

Discussion

  • Boris Brodski

    Boris Brodski - 2020-10-25

    This should work with the current version. Please, reopen, if you find further problems.

     
  • Boris Brodski

    Boris Brodski - 2020-10-25
    • status: open --> closed-fixed
     

Log in to post a comment.