Author Topic: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h  (Read 7907 times)

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« on: December 17, 2010, 11:26:21 am »
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
« Last Edit: December 17, 2010, 11:27:56 am by Linuxx »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #1 on: December 17, 2010, 11:30:36 am »
Read and understand this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Then ask where to set the options you need.
(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!]

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #2 on: December 17, 2010, 12:47:13 pm »
 
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

 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #3 on: December 17, 2010, 02:13:42 pm »
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.

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

Tim S.
« Last Edit: December 17, 2010, 02:17:40 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #4 on: December 17, 2010, 02:53:48 pm »
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

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #5 on: December 17, 2010, 03:28:35 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiling Error wxWidgets - wx/plotctrl/plotctrl.h
« Reply #6 on: December 17, 2010, 03:46:33 pm »
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!]