簡體   English   中英

編譯wxMathPlot時出錯

[英]Errors Compiling wxMathPlot

這是從先前發布的問題開始的:

如何為Win32構建wxmathPlot?

最好的答案是只將mathplot.h和mathplot.cpp文件添加到您的項目中,然后它應該可以工作。

但是,當我將這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

我怎樣才能解決這個問題?

在mathplot.cpp文件中,我用wxLogError更改了所有:: wxLogError

並注釋掉#define new DEBUG_NEW行 ,然后編譯成功。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM