Re: How to fix such errors occurred?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 6 Sept 2023 at 12:12, Dingjun Chen
<Dingjun.Chen@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi, Dear Sir or Madam,
>
> PS C:\plplot-5.15.0\build> gcc --version
> gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 13.2.0
> Copyright (C) 2023 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> In my application, I used wxWidgets library and PLplot's wxwidgets binding: wxPLplotwindow.h.
> I have successfully built PLplot library via CMake+MinGW64 compilers, but when using PLplot wxwidgets, the following errors occurred. Could someone help me with this problem?
>
> I really need to fix these errors that occurred from PLplot's wxwidgets binding and then proceed to build my application.  In my eyes there is nothing wrong in the plotwindow.h head file and please see the attached file for details. But GNU compiler generated such errors. It is very weird to me.

The error seems very clear to me. wxwidgets/wxPLplotwindow.h declares
wxPLplotwindow as a class template, but PlotWindows.h declares it as a
normal class, not a template.

There is nothing the GCC project can do to help you here, the code is
not valid C++. I suggest you look for newer versions of PLplot, or
contact the authors of those headers.




>
> By the way, I downloaded it from the site: http://plplot.org/downloads.php. In my application, I need to have wxWidgets for GUI and PLplot for graph plotting, especially wxwidgets binding of PLplot library. I
>
>
> I look forward to your help.
>
> Thanks and Regards,
>
> Dingjun
>
>
> ........................
> [ 47%] Building CXX object LibProject/src/CMakeFiles/PHCSharedlibrary.dir/twacRcnstruct.cpp.obj
> [ 48%] Building CXX object LibProject/src/CMakeFiles/PHCSharedlibrary.dir/xyzUtils.cpp.obj
> [ 49%] Building CXX object LibProject/src/CMakeFiles/PHCSharedlibrary.dir/xyzfilein.cpp.obj
> [ 50%] Linking CXX static library C:\Users\Dingjun.Chen\PHC_cmake\PHC_EXE_Lib_mingw64_plplot2\lib\libPHCSharedlibrary.a
> [ 50%] Built target PHCSharedlibrary
> [ 51%] Building CXX object MainProject/src/CMakeFiles/PHC_EXEProject.dir/BasePlot.cpp.obj
> In file included from C:/Users/Dingjun.Chen/PHC_cmake/PHC_EXE_Lib_mingw64_plplot2/MainProject/include/BasePlot.h:23,
> from C:\Users\Dingjun.Chen\PHC_cmake\PHC_EXE_Lib_mingw64_plplot2\MainProject\src\BasePlot.cpp:34:
> C:/Users/Dingjun.Chen/PHC_cmake/PHC_EXE_Lib_mingw64_plplot2/MainProject/include/plotWindow.h:83:7: error: class template 'wxPLplotwindow' redeclared as non-template
> 83 | class wxPLplotwindow;
> | ^~~~~~~~~~~~~~
> In file included from C:/Users/Dingjun.Chen/PHC_cmake/PHC_EXE_Lib_mingw64_plplot2/MainProject/include/plotWindow.h:21:
> C:/Users/Dingjun.Chen/Downloads/plplot-5.14.0.tar/plplot-5.14.0/bindings/wxwidgets/wxPLplotwindow.h:37:7: note: previous declaration here
> 37 | class wxPLplotwindow : public WXWINDOW
> | ^~~~~~~~~~~~~~
> C:/Users/Dingjun.Chen/PHC_cmake/PHC_EXE_Lib_mingw64_plplot2/MainProject/include/plotWindow.h:86:1: error: expected class-name before '{' token
> 86 | {
> | ^
>
> Dingjun Chen  | Software Developer
>
> [Geotech Airborne Geophysical Surveys]
>
> Geotech Ltd. dba Geotech Airborne | 270 INDUSTRIAL PKY S | AURORA ON CA | L4G 3T9
> T: +1 905 841 5004 | Dingjun.Chen@xxxxxxxxxxxxxxxxxxx<mailto:Dingjun.Chen@xxxxxxxxxxxxxxxxxxx> | www.geotechairborne.com<www.geotech.ca>
>
> P Please consider the environment before printing this email
>
> This message may contain PRIVILEGED AND PROPRIETARY INFORMATION intended solely for the use of the addressee (s) named above. Any disclosure, distribution, copying, or use of the information by others is strictly prohibited. If you have received this message in error, please advise the sender by immediate reply and delete the original message.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux