Вопрос

this is following on from this question posted previously:

How to build wxmathPlot for win32?

The best answer says to just add the mathplot.h and mathplot.cpp files to your project and then it should work.

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:

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

and comment out the line #define new DEBUG_NEW, then it compiles successfully.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top