Page 2 of 3

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 4:37 pm
by Feelings
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

Posted: Mon Jun 29, 2020 5:03 pm
by ONEEYEMAN
Hi,
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

Posted: Mon Jun 29, 2020 5:28 pm
by Feelings

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))

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 5:52 pm
by ONEEYEMAN
Hi,
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

Posted: Mon Jun 29, 2020 5:56 pm
by Feelings
App.cpp

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;
}
App.h

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

Posted: Mon Jun 29, 2020 6:24 pm
by ONEEYEMAN
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:

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
from the command prompt.

If you can build and run the minimal sample - you did something wrong with the C::B setup.

Thank you.

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 6:38 pm
by doublemax
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.

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 6:42 pm
by Feelings
./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

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 6:46 pm
by ONEEYEMAN
Hi,
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

Posted: Mon Jun 29, 2020 7:02 pm
by Feelings
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

Posted: Mon Jun 29, 2020 7:19 pm
by ONEEYEMAN
Hi,
OK, then just type:

Code: Select all

minimal.exe
Does it run?

Thank you.

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 7:20 pm
by Feelings
No, is the same comment

Re: Creating wxWidgets 3.1.3 project in Code::Blocks: No such file or directory

Posted: Mon Jun 29, 2020 7:33 pm
by PB
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

Posted: Mon Jun 29, 2020 7:37 pm
by Feelings
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

Posted: Mon Jun 29, 2020 7:43 pm
by ONEEYEMAN
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.