I finally got all of this to run without error although I did have to run nmake a few more times on the first go around.
Now I am trying to run the wxPLplotDemo.cpp
I created a project. It builds with no errors. Copied the necessary .dlls into the run directory because for some reason a path variable does not work.
Now I am getting this runtime error:
Unhandled exception at 0x00b3d51a (wxbase291ud_vc_custom.dll) in wxxplplot.exe: 0xC0000005: Access violation reading location 0x0000000c.
I hit break
it puts a breakpoint on a file called list.h on line 551.
Any ideas?
Thanks,
Linda
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the path variable doesn't work, since you forgot some %s, so it should be:
set PATH=%PLWIN%\buildnmake\dll;%PATH%
Apart from that, you can't use a static plplot library with your custom wxwidgets program, since you would end up with two app definitions, which definitely will cause problems. So only use the dynamic plplot library in that case.
HTH,
Werner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also it doesn't have a clue what wxWANTS_CHARS is. Can I be missing something else? This is only a runtime error. Could it be I have the wrong runtimes defined?
Linda
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PLplotwindow.cpp.obj
wxPLplotwindow.cpp
c:\dev\plplot-5.9.7\bindings\wxwidgets\wxPLplotwindow.h(36) : warning C4275: non
dll-interface class 'wxWindow' used as base for dll-interface class 'wxPLplotwi
ndow'
C:\dev\wxWidgets-2.9.1\include\wx/msw/window.h(32) : see declaration of
'wxWindow'
c:\dev\plplot-5.9.7\bindings\wxwidgets\wxPLplotwindow.h(35) : see declar
ation of 'wxPLplotwindow'
Linking CXX shared library ..\..\dll\plplotwxwidgetsd.dll
Creating library ..\..\dll\plplotwxwidgetsd.lib and object ..\..\dll\plplotwx
widgetsd.exp
I think it is preventing me from running the wxPLplotDemo demo.
After this successfully builds I run the wxPLplotDemo demo and it does absolutely nothing.
If I pull it into my development environment and get it to compile I get the following error:
Unhandled exception at 0x0041d51a (wxbase291ud_vc_custom.dll) in wxtest.exe: 0xC0000005: Access violation reading location 0x0000000c.
The moment I initialize a wxPLplotwindow
wxPanel * panel = new wxPanel( this );
wxPLplotwindow* wplotwindow = new wxPLplotwindow( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxPLPLOT_NONE );
It does not recognize the panel. That is where it dies.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Big thanks to Arjen for helping me get this up and running. Here is my latest batch file.
set PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN";%PATH%
set PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC";%PATH%
call vcvarsall
set PLWIN=C:\dev\plplot-5.9.7
cd %PLWIN%
mkdir buildnmake
cd buildnmake
cmake "%PLWIN%" -G "NMake Makefiles" -DBUILD_TEST=ON
nmake
nmake
nmake install
If you want the visual studio solution and projects generated you can type the following command but it does not complete without errors. However it did compile the wxplplotdemo which was the project I was most interested in.
cmake "C:/dev/plplot-5.9.7" -G "Visual Studio 9 2008" -DBUILD_TEST=ON
They are looking into the problem.
Linda
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried following the generic CMake procedure using Visual Studio 2008 Express I got the expected ALL_BUILD project, but it kept complaining about array sizes being defined with PLINT types, which equated to some int type, which raised an error, since one should be declaring array sizes with constants. I thought updating to the new version of Visual Studio 2010 Express might do the job. I got a different error, but still, nothing compiled. I followed the above instructions. I got the following, starting with the point at which the error occurred:
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Built target csirocsa
Built target deltaT-gen
Built target tai-utc-gen
Built target tai-utc.h_built
Built target deltaT.h_built
Built target qsastime
Built target plhershey-unicode-gen
Built target plhershey-unicode.h_built
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Built target csirocsa
Built target deltaT-gen
Built target tai-utc-gen
Built target tai-utc.h_built
Built target deltaT.h_built
Built target qsastime
Built target plhershey-unicode-gen
Built target plhershey-unicode.h_built
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
It looks like the same BS.
BTW: does anybody prefer this little bitty window SourceForge makes you write your responses in?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Windows 7
Visual Studio 2008 SP 1
plplot-5.9.7
wxWidgets-2.9.1
I followed the steps here:
http://www.miscdebris.net/plplot_wiki/index.php?title=WxWidgets
Here is my batch file:
set PLWIN=C:\dev\plplot-5.9.7
set WXWINDLL=%WXWIN%\lib\vc_dll
cd %PLWIN%
set PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC";%PATH%
call vcvarsall
mkdir buildnmake
cd buildnmake
set PATH=PLWIN\buildnmake\dll;%PATH%
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install .. -DwxWidgets_LIB_DIR=%WXWINDLL% -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
nmake
nmake install
rename install\bin\plplotcxxd.dll plplotcxx.dll
rename install\bin\plplotd.dll plplot.dll
rename install\bin\plplotwxwidgetsd.dll plplotwxwidgets.dll
rename install\lib\plplotcxxd.lib plplotcxx.lib
rename install\lib\plplotd.lib plplot.lib
rename install\lib\plplotwxwidgetsd.lib plplotwxwidgets.lib
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install .. -DwxWidgets_LIB_DIR=%WXWINDLL% -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
nmake
nmake install
rename install\lib\plplotcxxd.lib plplotcxxs.lib
rename install\lib\plplotd.lib plplots.lib
rename install\lib\plplotwxwidgetsd.lib plplotwxwidgetss.lib
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install .. -DwxWidgets_LIB_DIR=%WXWINDLL% -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF
nmake
nmake install
rename install\lib\plplotcxxd.lib plplotcxxsd.lib
rename install\lib\plplotd.lib plplotsd.lib
rename install\lib\plplotwxwidgetsd.lib plplotwxwidgetssd.lib
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install .. -DwxWidgets_LIB_DIR=%WXWINDLL% -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON
nmake
nmake install
I finally got all of this to run without error although I did have to run nmake a few more times on the first go around.
Now I am trying to run the wxPLplotDemo.cpp
I created a project. It builds with no errors. Copied the necessary .dlls into the run directory because for some reason a path variable does not work.
Now I am getting this runtime error:
Unhandled exception at 0x00b3d51a (wxbase291ud_vc_custom.dll) in wxxplplot.exe: 0xC0000005: Access violation reading location 0x0000000c.
I hit break
it puts a breakpoint on a file called list.h on line 551.
Any ideas?
Thanks,
Linda
Hi Linda,
the path variable doesn't work, since you forgot some %s, so it should be:
set PATH=%PLWIN%\buildnmake\dll;%PATH%
Apart from that, you can't use a static plplot library with your custom wxwidgets program, since you would end up with two app definitions, which definitely will cause problems. So only use the dynamic plplot library in that case.
HTH,
Werner
Thanks for that typo. Unfortunately it does not make a difference. So can you help me with my first plplot/wxwidgets project.
Create a New Project
Copy wxPLplotDemo.cpp into the directory.
Drop it into the tree and it shows up under Source.
Project->Properties
C/C++ Additional Include Directories
"$(WXWIN)\include";
"C:\dev\plplot-5.9.7\buildnmake\install\include\plplot"
Linker
Additional Library Directories
"C:\dev\plplot-5.9.7\buildnmake\install\lib";
"$(WXWIN)\lib\vc_dll"
Input
wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib csirocsa.lib plplot.lib plplotcxx.lib plplotcxxd.lib plplotcxxs.lib plplotcxxsd.lib plplotd.lib plplots.lib plplotsd.lib plplotwxwidgets.lib plplotwxwidgetsd.lib plplotwxwidgetss.lib plplotwxwidgetssd.lib qsastime.lib
I get a whole ton of unresolved symbols.
I just would like to get one project up and running.
So then I tried to run the wxplplotdemo from the examples/c++ directory.
got this error: 16:12:13:Error: Can't create window of class wxWindow@016A9E08 (error 0: the operation completed successfully)
Any help would be great including if you want to send me the binaries. :)
Linda
I can get it to compile now. In case anyone else is in the same "murder/death/kill" mode here are the options:
Enable Incremental Linking
Include Directories
"$(WXWIN)\include";
"$(WXWIN)\lib\vc_lib\mswd";
"C:\dev\plplot-5.9.7\buildnmake\install\include\plplot"
Include Libraries
"$(WXWIN)\lib\vc_lib";
"C:\dev\plplot-5.9.7\buildnmake\dll"
Input
wxmsw29ud_core.lib
wxbase29ud.lib
wxtiffd.lib
wxjpegd.lib
wxpngd.lib
wxzlibd.lib
wxregexud.lib
wxexpatd.lib
wxmsw29ud_xrc.lib
kernel32.lib
user32.lib
gdi32.lib
comdlg32.lib
winspool.lib
winmm.lib
shell32.lib
comctl32.lib
ole32.lib
oleaut32.lib
uuid.lib
rpcrt4.lib
advapi32.lib
wsock32.lib
wininet.lib
plplotwxwidgetsd.lib
plplotcxxd.lib
plplotd.lib
csirocsa.lib
qsastime.lib
But I am back to the oh, so familiar error when I run:
Unhandled exception at 0x0041d51a (wxbase291ud_vc_custom.dll) in wxtest.exe: 0xC0000005: Access violation reading location 0x0000000c.
Stops at this location in list.h (Line 551)
wxNodeBase *GetFirst() const { return m_nodeFirst; }
Also it doesn't have a clue what wxWANTS_CHARS is. Can I be missing something else? This is only a runtime error. Could it be I have the wrong runtimes defined?
Linda
I am getting the following warning:
PLplotwindow.cpp.obj
wxPLplotwindow.cpp
c:\dev\plplot-5.9.7\bindings\wxwidgets\wxPLplotwindow.h(36) : warning C4275: non
dll-interface class 'wxWindow' used as base for dll-interface class 'wxPLplotwi
ndow'
C:\dev\wxWidgets-2.9.1\include\wx/msw/window.h(32) : see declaration of
'wxWindow'
c:\dev\plplot-5.9.7\bindings\wxwidgets\wxPLplotwindow.h(35) : see declar
ation of 'wxPLplotwindow'
Linking CXX shared library ..\..\dll\plplotwxwidgetsd.dll
Creating library ..\..\dll\plplotwxwidgetsd.lib and object ..\..\dll\plplotwx
widgetsd.exp
when I try the instructions here:
http://www.miscdebris.net/plplot_wiki/index.php?title=WxWidgets
I think it is preventing me from running the wxPLplotDemo demo.
After this successfully builds I run the wxPLplotDemo demo and it does absolutely nothing.
If I pull it into my development environment and get it to compile I get the following error:
Unhandled exception at 0x0041d51a (wxbase291ud_vc_custom.dll) in wxtest.exe: 0xC0000005: Access violation reading location 0x0000000c.
The moment I initialize a wxPLplotwindow
wxPanel * panel = new wxPanel( this );
wxPLplotwindow* wplotwindow = new wxPLplotwindow( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxPLPLOT_NONE );
It does not recognize the panel. That is where it dies.
Big thanks to Arjen for helping me get this up and running. Here is my latest batch file.
set PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN";%PATH%
set PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC";%PATH%
call vcvarsall
set PLWIN=C:\dev\plplot-5.9.7
cd %PLWIN%
mkdir buildnmake
cd buildnmake
cmake "%PLWIN%" -G "NMake Makefiles" -DBUILD_TEST=ON
nmake
nmake
nmake install
If you want the visual studio solution and projects generated you can type the following command but it does not complete without errors. However it did compile the wxplplotdemo which was the project I was most interested in.
cmake "C:/dev/plplot-5.9.7" -G "Visual Studio 9 2008" -DBUILD_TEST=ON
They are looking into the problem.
Linda
I tried following the generic CMake procedure using Visual Studio 2008 Express I got the expected ALL_BUILD project, but it kept complaining about array sizes being defined with PLINT types, which equated to some int type, which raised an error, since one should be declaring array sizes with constants. I thought updating to the new version of Visual Studio 2010 Express might do the job. I got a different error, but still, nothing compiled. I followed the above instructions. I got the following, starting with the point at which the error occurred:
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Built target csirocsa
Built target deltaT-gen
Built target tai-utc-gen
Built target tai-utc.h_built
Built target deltaT.h_built
Built target qsastime
Built target plhershey-unicode-gen
Built target plhershey-unicode.h_built
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Built target csirocsa
Built target deltaT-gen
Built target tai-utc-gen
Built target tai-utc.h_built
Built target deltaT.h_built
Built target qsastime
Built target plhershey-unicode-gen
Built target plhershey-unicode.h_built
Building C object src/CMakeFiles/plplotd.dir/pllegend.c.obj
pllegend.c
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2057: expected constan
t expression
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2466: cannot allocate
an array of constant size 0
C:\Programming\plplot-5.9.8\src\pllegend.c(1124) : error C2133: 'opt_label' : un
known size
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
It looks like the same BS.
BTW: does anybody prefer this little bitty window SourceForge makes you write your responses in?