News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Compiling Error wxWidgets - wx/plotctrl/plotctrl.h

Started by Linuxx, December 17, 2010, 11:26:21 AM

Previous topic - Next topic

Linuxx

Hi Folks!

Since two days I am trying to compile a wxWidgets project in C::B (gtimer2 as per the Spanish Introduction to wxWidgets and C::B. See: http://wiki.wxformbuilder.org/Main/Tutorials) and I keep getting the same build error message over and over again - no matter what I do. This is the message: wx/plotctrl/plotctrl.h No such file or directory. I added the directory to all search directories in project options and I added all the libraries to all the required places as per the above mentioned document. Now I'm at my wits' end.  :( :( :( To be honest, I don't quite understand what I'm doing. Why aren't the paths and libraries added automatically? Will I have to be doing this every time I want to build a project?

Please!!! Can anyone help???

Thanks for feedback...

Oli

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Linuxx

 
Thanks for the link!

I had a look at the build log, but don't understand what it is trying to say. Now, this is not laziness, I am new to all of this and I don't "live here", so please be patient with me. Perhaps someone out there can help me understand the log so I can make use of it. A solution would be good, but understanding it and learning from it would be even better... Here's the log:


-------------- Build: Debug in gtimer2 ---------------

mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g
-IC:\SourceCode\Libraries\wxWidgets2.8\include
-IC:\SourceCode\Libraries\wxWidgets2.8\contrib\include
-IC:\SourceCode\Libraries\wxWidgets2.8\additions\include\wx
-IC:\SourceCode\Libraries\wxWidgets2.8\additions\include\wx\plotctrl
-IC:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_dll\mswu
-IC:\SourceCode\Libraries\wxWidgets2.8\additions\lib\gcc_lib
-IC:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib
-IC:\SourceCode\Libraries\wxWidgets2.8\additions\include\wx
-IC:\SourceCode\Libraries\wxWidgets2.8\additions\include\wx\plotctrl  -c
D:\...\gtimer2\gtimer2App.cpp -o obj\Debug\gtimer2App.o
In file included
from D:\...\gtimer2\gtimer2Main.h:18,
from D:\...\gtimer2\gtimer2App.cpp:19:
D:\...\gtimer2\GUIFrame.h:17:34: error: wx/plotctrl/plotctrl.h: No such file or directory
In file included
from D:\...\gtimer2\gtimer2Main.h:18,
from D:\...\gtimer2\gtimer2App.cpp:19:
D:\...\gtimer2\GUIFrame.h:39: error: ISO C++ forbids declaration of 'wxPlotCtrl' with no type
D:\...\gtimer2\GUIFrame.h:39: error: expected ';' before '*' token
Process terminated with status 1 (0 minutes, 2 seconds)
3 errors, 0 warnings


Thanks!

Oli


stahta01

#3
Why is the folder "C:\SourceCode\Libraries\wxWidgets2.8\additions\include" not in your list of search for headers?

FYI: Having any wxWidgets search folders ending in "wx" like the one below is nearly always wrong.


-IC:\SourceCode\Libraries\wxWidgets2.8\additions\include\wx


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Linuxx

Thanks, Tim! That was it!!!  :D :D :D

After having solved this, I got another error message saying something like wxMessageBox was not declared in this scope. That one was solved by adding #include <wx/msgdlg.h> to the header.

Now I get a huge amount of messages of the type undefined reference to... I'll go and look for a solution out there. Perhaps one of you C::B cracks is quicker than I am...  :wink:

Happy Oli

Linuxx

Tried a different compiler (MSVC). Now I get a completely different error message (translated, wording may be slightly different): cannot open libwxmsw28ud.a.lib.

Any ideas anybody?  :?  Suppose all of this is newbie stuff...

Oli

oBFusCATed

Yes, you have to find a tutorial explaining the compiling process....

Also:
Prob1: you've not linked you application to the wx libs
Prob2: don't mix compilers (msvc and mingw are not compatible)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]