wxWidgets error
Posted: Mon Dec 16, 2013 8:08 am
Hello, I'm a neophyte to CodeLite: I was trying to compile this simple program with wxWidgets libraries, but I cannot complete the compilation because I MinGW returns this error:
[/color]
This is the main frame .cpp code:
Code: Select all
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
"----------Building project:[ foobar - Debug ]----------"
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/Marco/Documents/C++/P1/foobar'
windres -i "C:/Users/Marco/Documents/C++/P1/foobar/resources.rc" wx-config Error: No valid setup.h of wxWidgets has been found at location: C:/wxWidgets-2.9.5/lib/gcc_dll/msw/wx/setup.h -o ./Debug/resources.rc.o
g++: error: wx-config: No such file or directory
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: location:: Invalid argument
g++: error: C:/wxWidgets-2.9.5/lib/gcc_dll/mswud/wx/setup.h: No such file or directory
g++: error: C:/wxWidgets-2.9.5/lib/gcc_dll/mswud/wx/setup.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/foobar_frame.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [Debug/foobar_app.o.d] Error 1
foobar.mk:105: recipe for target `Debug/foobar_frame.o.d' failed
foobar.mk:97: recipe for target `Debug/foobar_app.o.d' failed
Usage: windres [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
windres: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
mingw32-make.exe[1]: *** [Debug/resources.rc.o] Error 1
mingw32-make.exe: *** [All] Error 2
foobar.mk:111: recipe for target `Debug/resources.rc.o' failed
mingw32-make.exe[1]: Leaving directory `C:/Users/Marco/Documents/C++/P1/foobar'
Makefile:4: recipe for target `All' failed
0 errors, 0 warnings
This is the main frame .cpp code:
Code: Select all
#include "foobar_frame.h"
#include <wx/toolbar.h>
#include <wx/statusbr.h>
#include <wx/sizer.h>
#include <wx/menu.h> //wxMenuBar
BEGIN_EVENT_TABLE(FoobarFrame, wxFrame)
EVT_CLOSE(FoobarFrame::OnClose)
EVT_MENU(wxID_EXIT, FoobarFrame::OnQuit)
END_EVENT_TABLE()
FoobarFrame::FoobarFrame(wxWindow* parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style)
: wxFrame(parent, id, title, pos, size, style)
{
Initialize();
}
FoobarFrame::~FoobarFrame()
{
}
void FoobarFrame::Initialize()
{
wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL);
SetSizer(sz);
//Create a status bar
wxStatusBar* statusBar = new wxStatusBar(this, wxID_ANY);
statusBar->SetFieldsCount(1);
SetStatusBar(statusBar);
GetStatusBar()->SetStatusText(_("Ready"));
//Create a menu bar
CreateMenuBar();
sz->Layout();
}
void FoobarFrame::OnClose(wxCloseEvent &e)
{
e.Skip();
}
void FoobarFrame::OnQuit(wxCommandEvent &e)
{
wxUnusedVar(e);
Close();
}
void FoobarFrame::CreateMenuBar()
{
wxMenuBar *mb = new wxMenuBar();
//File Menu
wxMenu *menu = new wxMenu();
menu->Append(wxID_EXIT);
mb->Append(menu, _("&File"));
SetMenuBar(mb);
}