简体   繁体   English

编译wxMathPlot时出错

[英]Errors Compiling wxMathPlot

this is following on from this question posted previously: 这是从先前发布的问题开始的:

How to build wxmathPlot for win32? 如何为Win32构建wxmathPlot?

The best answer says to just add the mathplot.h and mathplot.cpp files to your project and then it should work. 最好的答案是只将mathplot.h和mathplot.cpp文件添加到您的项目中,然后它应该可以工作。

however, after I add these 2 files to my project in visual studios 2010 (by right-clicking my project->add->existing item and selecting the 2 files) and try to compile, I get the following errors: 但是,当我将这2个文件添加到Visual Studios 2010中的项目中(通过右键单击我的项目->添加->现有项目并选择2个文件)并尝试编译后,出现以下错误:

1>  mathplot.cpp
1>mathplot.cpp(133): warning C4100: 'event' : unreferenced formal parameter
1>mathplot.cpp(133): warning C4100: 'w' : unreferenced formal parameter
1>mathplot.cpp(278): warning C4100: 'event' : unreferenced formal parameter
1>mathplot.cpp(278): warning C4100: 'w' : unreferenced formal parameter
1>mathplot.cpp(2239): warning C4996: 'wxImage::SaveFile': was declared deprecated
1>mathplot.cpp(2610): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2610): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2610): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2610): error C2181: illegal else without matching if
1>mathplot.cpp(2749): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2749): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2749): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2749): error C2181: illegal else without matching if
1>mathplot.cpp(2750): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2750): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2750): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2750): error C2181: illegal else without matching if
1>mathplot.cpp(2751): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2751): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2751): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2751): error C2181: illegal else without matching if
1>mathplot.cpp(2763): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2763): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2763): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2763): error C2181: illegal else without matching if
1>mathplot.cpp(2847): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2847): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2847): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2847): error C2181: illegal else without matching if
1>mathplot.cpp(2877): error C2589: 'if' : illegal token on right side of '::'
1>mathplot.cpp(2877): error C2143: syntax error : missing ';' before '::'
1>mathplot.cpp(2877): error C2143: syntax error : missing ';' before '{'
1>mathplot.cpp(2877): error C2181: illegal else without matching if

how can I fix this? 我怎样才能解决这个问题?

In mathplot.cpp file, I have changed all ::wxLogError with wxLogError 在mathplot.cpp文件中,我用wxLogError更改了所有:: wxLogError

and comment out the line #define new DEBUG_NEW , then it compiles successfully. 并注释掉#define new DEBUG_NEW行 ,然后编译成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM