2D-Plots Topic is solved

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.
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

doublemax wrote:
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

Code: Select all

nmake -fmakefile.vc WX_DIR=c:\path\to\my\wxWidgets WX_UNICODE=1 WX_DEBUG=1 WX_SHARED=0 WX_MONOLITHIC=0
Admin mode should not be necessary.

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

"C:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\include\wx/axis/axis.h(410): error C3646: 'wxOVERRIDE': unknown override specifier"

I'm going to see how to solve this, I will let you know:)
thanks, many thanks
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax »

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.
Use the source, Luke!
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: 2D-Plots

Post by mill-j »

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 .
[-X Don't Complain, Change It, It's Open-Source!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: 2D-Plots

Post by PB »

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.
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

Thanks guys for your answers..
I deleted all wxOverride occurences, but at the end I can't build because of this

" NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.EXE"' : return code '0x2' "
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax »

There must be more relevant information before that error.
Use the source, Luke!
Laurent Berger
Earned some good credits
Earned some good credits
Posts: 138
Joined: Tue May 20, 2008 1:03 pm

Re: 2D-Plots

Post by Laurent Berger »

L.B.
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

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!
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax »

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.
Use the source, Luke!
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

thank you very much to all of you for the precious help!
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

Does anyone know hot to set up wxFreeChart with Visual Studio 2017?

I added these lines

" C:\....\wxFreeChart-master\include; " in Configuration Properties --> VC ++ directories --> Include directories

" C:\...wxFreeChart-master\lib\vc_lib; " In Configuration Properties --> VC ++ directories --> library directories

I have 10 unresolved external ( fatal error LNK1120: 10 unresolved externals ) trying to build a sample starting from a new
project.

Thank you very much!
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax »

If would be helpful if you also showed the errors.

Just adding the entry to the library directories is not enough. Did you also add the freechart lib(s) to the list of input libraries?
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: 2D-Plots

Post by PB »

Did you also add the actual library to the linker input libraries?
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack »

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 ==========

Thanks a lot, really
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: 2D-Plots

Post by mill-j »

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.
[-X Don't Complain, Change It, It's Open-Source!
Post Reply