I get an unresolved external error when I try to compile the sample files in Visual Studio 2010.
---- Rebuild All started: Project: mpSample1, Configuration: Debug Win32 ----
Building Custom Rule G:/Software Packages/wxMathPlot/wxMathPlot-0.1.2/samples/sample1/CMakeLists.txt
CMake does not need to re-run because CMakeFiles/generate.stamp is up-to-date.
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
G:\Software Packages\wxMathPlot\wxMathPlot-0.1.2\build\samples\sample1\Debug\mpSample1.exe : fatal error LNK1120: 1 unresolved externals
I had no trouble compiling wxMathPlot with CMake. I loaded the project files it created in VS2k10 and cannot get it to compile.
any help is appreciated, thanks
I forgot to mention I have this problem in win7 x64 and vista 32
I never tested wxMathPlot with Visual Studio 2010, but I believe this is not closely related to this: it looks like that the app results to be set as a console app, while it has to be build as Windows app. This is set correctly by CMake, but sometimes Visual Studio, for its unfathomable reasons, ignores some directives set by CMake and they have to be set by hand through the Visual Studio Project Properties window. A similar thisn happens with Unicode builds: I set the appropriate definitions in CMake config, but Visual Studio sometimes ignores them.
That fixed it! I successfully built and ran all 3 sample programs. Well, actually I had an error about a missing graphics file in sample 3 but I don't think it's related to this; nonetheless it still runs.
Log in to post a comment.