If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
EDIT: If i open with admin permissions visual studio prompt and write :
" c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools> make-fC:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build\makefile.vc WX_DIR=C:\wxWidgets WX_UNICODE=1 ecc" I fall into a syntax error (now I don't have the makefile alone, but there is
No.
Please do exactly as people tell you.
- open VS command prompt
- cd to C:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build\
Use this command, but replace the directory "c:\path\to\my\wxWidgets" to the one on your system
BTW: There are also VS solution files in that directory. For these you only need to the the environement variable WXWIN to the path to your wxWidgets version.
Sorry, you're right, I thaught it could have worked doing this further attempt.
Anyway, I've done exactly as you told me (adding WX_VERSION=30) and I have another error
wxOVERRIDE is only defined in wxWidgets 3.1.x. Strange that wxFreeChart defaults to 2.8 libraries when it only supports wx 3.1.x. I think you could also just remove wxOVERRIDE from all wxFreeChart files, there are only 9 occurences.
doublemax wrote:wxOVERRIDE is only defined in wxWidgets 3.1.x. Strange that wxFreeChart defaults to 2.8 libraries when it only supports wx 3.1.x. I think you could also just remove wxOVERRIDE from all wxFreeChart files, there are only 9 occurences.
Correct, I had to do that to build against 3.0.2 .
doublemax wrote:wxOVERRIDE is only defined in wxWidgets 3.1.x. Strange that wxFreeChart defaults to 2.8 libraries when it only supports wx 3.1.x.
I think this is because the source files were modified by "iwbnwif" but the makefiles were left as they were when A. V. Moskvichev abandoned the project he created.
Don't know why but now it builds (with WX_DEBUG = 0 and 1 both) .
I did again all the process, maybe I did some mistakes during one of the intermediate steps.
My question is: it's enough to do these 2 steps (with the " > nmake -fmakefile.vc .... " line)
or I have to do even the "> make -fmakefile.bcc .... " version) ?
Wow, it seems very professional, thanks @Laurent Berger!
My question is: it's enough to do these 2 steps (with the " > nmake -fmakefile.vc .... " line)
or I have to do even the "> make -fmakefile.bcc .... " version) ?
One is enough. Other versions are for other compilers, e.g. "make -fmakefile.bcc" is the Borland compiler.
I've added in Linker --> Input --> Additional Dependencies the path to "wxcode_msw30u_freechart.lib" in release mode,
and "wxcode_msw30ud_freechart.lib" for the debug one.
Now I have 5 unresolved external, and not 10 anymore. It's a little progress.
I'm trying to build the sample "demo.cpp" , together with "demo.h" and "democollection.h" which are included in demo.cpp
The output is this
1>------ Build started: Project: TutorialWX, Configuration: Release Win32 ------
1>demo.cpp
1>demo.obj : error LNK2001: unresolved external symbol "public: static class DemoCollection * __cdecl DemoCollection::Get(void)" (?Get@DemoCollection@@SAPAV1@XZ)
1>demo.obj : error LNK2001: unresolved external symbol "public: class ChartDemo * __thiscall DemoCollection::GetCategoryDemo(int,int)" (?GetCategoryDemo@DemoCollection@@QAEPAVChartDemo@@HH@Z)
1>demo.obj : error LNK2001: unresolved external symbol "public: int __thiscall DemoCollection::GetCategoryDemoCount(int)" (?GetCategoryDemoCount@DemoCollection@@QAEHH@Z)
1>demo.obj : error LNK2001: unresolved external symbol "public: class wxString const & __thiscall DemoCollection::GetCategory(int)" (?GetCategory@DemoCollection@@QAEABVwxString@@H@Z)
1>demo.obj : error LNK2001: unresolved external symbol "public: int __thiscall DemoCollection::GetCategoryCount(void)" (?GetCategoryCount@DemoCollection@@QAEHXZ)
1>C:\Users\Jack\source\repos\Vuoto_Già_configurato\Release\TutorialWX.exe : fatal error LNK1120: 5 unresolved externals
1>Done building project "TutorialWX.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
So you're trying to build the wxFreeChart sample? Isn't it built automatically when you built the library? Mine did. If it doesn't try the makefiles in the build folder.