Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Oh, I didin,t notice that you change MONOLITHIC from 1 to 0. I complie wxWidgets from command line again, this time using MONOLITHIC=0 and create a project in C::B and still have error "wx/app.h: No such file or directory".
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Hi,
Can you post the whole build log with the error?
Thank you.
Can you post the whole build log with the error?
Thank you.
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Code: Select all
Linking console executable: C:\Users\grz\Desktop\C++\Project\ProjectMain.exe
In file included from C:\Users\grz\Desktop\C++\Project\ProjectMain.h:15:0,
from C:\Users\grz\Desktop\C++\Project\ProjectMain.cpp:18:
C:\Users\grz\Desktop\C++\Project\ProjectApp.h:13:20: fatal error: wx/app.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Last edited by Feelings on Mon Jun 29, 2020 5:55 pm, edited 1 time in total.
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Hi,
Could you please post the code you are using?
Thank you.
Could you please post the code you are using?
Thank you.
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
App.cpp
App.h
Code: Select all
#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
#include "ProjectApp.h"
#include "ProjectMain.h"
IMPLEMENT_APP(ProjectApp);
bool ProjectApp::OnInit()
{
ProjectFrame* frame = new ProjectFrame(0L);
frame->SetIcon(wxICON(aaaa)); // To Set App Icon
frame->Show();
return true;
}
Code: Select all
#ifndef PROJECTAPP_H
#define PROJECTAPP_H
#include <wx/app.h>
class ProjectApp : public wxApp
{
public:
virtual bool OnInit();
};
#endif // PROJECTAPP_H
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Hi,
Why are you including the app.h, and why do you include it in the header file?
Remove that line.
Look at the wxWidgets-3.1.3\samples\minimal file minimal.cpp.
You should include the wx/wx.h header file in the source code. Just like in the minimal sample.
Also, to make sure you have everything working - try to do the following:
from the command prompt.
If you can build and run the minimal sample - you did something wrong with the C::B setup.
Thank you.
Why are you including the app.h, and why do you include it in the header file?
Remove that line.
Look at the wxWidgets-3.1.3\samples\minimal file minimal.cpp.
You should include the wx/wx.h header file in the source code. Just like in the minimal sample.
Also, to make sure you have everything working - try to do the following:
Code: Select all
cd c:\wxWidgets-3.1.3\samples\minimal
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
./minimal.exe
If you can build and run the minimal sample - you did something wrong with the C::B setup.
Thank you.
Last edited by ONEEYEMAN on Mon Jun 29, 2020 7:20 pm, edited 1 time in total.
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
All errors are still "No such file or directory". Just go through the project settings manually and check the include path(s). There must be a mistake somewhere. And then also check if the header files are actually there.
Use the source, Luke!
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
./minimal.exe ? This line is after mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1 ?
because I have problem with this command ./minimal.exe
because I have problem with this command ./minimal.exe
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Hi,
Yes, there are 3 lines.
Just execute them one by one.
Thank you.
Yes, there are 3 lines.
Just execute them one by one.
Thank you.
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
I have problem with last command '.' is not recognized as an internal or external command, operable program or batch file
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
No, is the same comment
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
The minimal sample executable (minimal.exe) for the static debug build is built in the gcc_mswud subfolder of the minimal sample folder. Just use File Explorer to see if it is there or not and launch it?
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
If you talking about minimal application so its okay...I get small window
Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory
Hi,
Yes, so minimal sample was built and ran fine.
Good.
Now it is only a matter of setting up the C::B.
Try to add the code from the minimal sample into your C::B project and recompile.
Or better yet - start from scratch.
Create a new C::B project and put the screenshot here as you go.
Then we can visualize and guide you what you are doing wrong.
Or check the very recent "Sticky" tread about setting up the C::B project.
Thank you.
Yes, so minimal sample was built and ran fine.
Good.
Now it is only a matter of setting up the C::B.
Try to add the code from the minimal sample into your C::B project and recompile.
Or better yet - start from scratch.
Create a new C::B project and put the screenshot here as you go.
Then we can visualize and guide you what you are doing wrong.
Or check the very recent "Sticky" tread about setting up the C::B project.
Thank you.