While Building Program
While Building Program
I Am Using Codeblock Verion 16.01 And Wxwidget Version 3.1. While Building My Program I Got The Following Error: (1) wchar_t must be available. (2) <menu.h>: such file not available. I Can Some Help Explain These Please.
Re: While Building Program
How did you build the wxWidgets libraries? Please post the exact command line.
Also post the exact error messages. If there are many errors, post the first 10-20 lines only.
Also post the exact error messages. If there are many errors, post the first 10-20 lines only.
Use the source, Luke!
Re: While Building Program
As the first link is for Linux: Are you working under Linux?
In any case, forget about CodeBlocks in the beginning. First try to build the wxWidgets libraries and the "minimal" sample that comes with it, from the command line. Once that works, you can try to setup an IDE.
Follow the instructions here:
https://wiki.wxwidgets.org/Compiling_an ... ng_started
If something goes wrong, please tell exactly what you did and what errors you're getting. Otherwise nobody will be able to help you.
In any case, forget about CodeBlocks in the beginning. First try to build the wxWidgets libraries and the "minimal" sample that comes with it, from the command line. Once that works, you can try to setup an IDE.
Follow the instructions here:
https://wiki.wxwidgets.org/Compiling_an ... ng_started
If something goes wrong, please tell exactly what you did and what errors you're getting. Otherwise nobody will be able to help you.
Use the source, Luke!
Re: While Building Program
Thanks For Reply. I Have Heared A Lots Of Statement And Examples That One Must Be Able To Compile And Comfigure Wxwidgets Before Using With Codeblock. For Example Before Installing Wxwidgets I Created A Folder And Name It "wxwidgets" now wxwidgets is residing in C:\wxwidgets, Although I Am Using Window 7. Now To Run The Compiling, On My Window7, I Can Click-> "Start" -> "Search" In Search Field I Can Type "cmd.exe" And Link Will Open Up At The Left Side Of The Screen, Then I Can Right-Click And Select Run As Administrator. Now What Do I Have To Type In Command Line To Start The Compiling Proccess? (Some Source From This Url, Example https://wiki.wxwidgets.org Are not working). Thanks In Advance.
Last edited by Chikwado on Mon Oct 09, 2017 12:38 pm, edited 1 time in total.
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: While Building Program
The link i posted was for Linux. Ff you're under Windows, this should help:Now What Do I Have To Type In Command Line To Start The Compiling Proccess?
https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW
Use the source, Luke!
Re: While Building Program
Dear Moderator, That Link Could Not Be Open If I Click It, It Return Empty Page. My Codeblocks Version Is: Codeblocks-16.01mingw-setup.exe. Which I Use For Window 7 32bit Do I Need Another Mingw For Wxwidgets? Thanks.
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: While Building Program
The link works fine for me.
AFAIK the CB installer does not add the path to MingW to the %PATH% automatically. Open a command window and enter "gcc -v". If it outputs the compiler info, everything is ok so far.
If not, you have to add the path to the compiler (e.g. c:\mingw\bin ) to the %PATH% and restart your system. (Google if you don't know what that means or if you don't know how to do it.)
Once the compiler is found open a command window and navigate to <where you installed wxwidget>\build\msw and enter:
If that compiles wxWidgets successfully, continue here:
viewtopic.php?p=169501&sid=8b310aedd398 ... 93#p169501
This might also be helpful:
viewtopic.php?p=178326#p178326
(BTW: Anyone familiar with MinGW and CodeBlocks willing to make a Wiki page for this? These questions come so often...)
AFAIK the CB installer does not add the path to MingW to the %PATH% automatically. Open a command window and enter "gcc -v". If it outputs the compiler info, everything is ok so far.
If not, you have to add the path to the compiler (e.g. c:\mingw\bin ) to the %PATH% and restart your system. (Google if you don't know what that means or if you don't know how to do it.)
Once the compiler is found open a command window and navigate to <where you installed wxwidget>\build\msw and enter:
Code: Select all
mingw32-make -f makefile.gcc SHARED=0 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11" BUILD=debug
mingw32-make -f makefile.gcc SHARED=0 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11" BUILD=release
viewtopic.php?p=169501&sid=8b310aedd398 ... 93#p169501
This might also be helpful:
viewtopic.php?p=178326#p178326
(BTW: Anyone familiar with MinGW and CodeBlocks willing to make a Wiki page for this? These questions come so often...)
Use the source, Luke!
Re: While Building Program
Thanks Moderator For All The Support, My Knowledge Of Wxwidget Is Improving, But... Would I Have To Type Those Code In Command Line And Go "ENTER", Or Would I Have To Open Makefile.gcc In Notepad To Edit It?. Thanks.
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: While Building Program
Yes. Make sure to "navigate" to the correct directory first.Would I Have To Type Those Code In Command Line And Go "ENTER"
In case you don't know how to do that: http://www.colorado.edu/geography/gcraf ... html#chdir
Use the source, Luke!
Re: While Building Program
After Installing Codeblock I Use To Create Console Project, Write Code In Codeblock Ide And Click F9 To Compile It Which Work Fine. Now To Compile Wxwidget, I Have Wxwidget In C:\wxwidget, Then In Codeblock, C:\Program Files\codeblock\mingw, I Copy The Folder "mingw" And Paste In "C:\", Now To Run Window Commandline, I Run This Example: cd <MINGW>\bin mingw32-make -v and got this error: The System Cannot Fined The File Specified. There Are Some Source Here.
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: While Building Program
This is never a good idea.I Copy The Folder "mingw" And Paste In "C:\",
Please read what i wrote before:
AFAIK the CB installer does not add the path to MingW to the %PATH% automatically. Open a command window and enter "gcc -v". If it outputs the compiler info, everything is ok so far.
If not, you have to add the path to the compiler (e.g. c:\mingw\bin ) to the %PATH% and restart your system. (Google if you don't know what that means or if you don't know how to do it.)
Wrong again. Please follow the instructions exactly.cd <MINGW>\bin mingw32-make
If your compiler is found on the command line (see above), navigate to c:\wxWidgets\build\msw\ and then enter the commands from my previous post.
Use the source, Luke!
Re: While Building Program
I Need Example On How To Add Path To Compiler, For Example I Took The Following Step As Window 7 User: Start -> Right-click Computer -> Advance System Setting -> Environment Variable -> Click -> Path Click-> Edit -> Add C:\MinGw\bin finally Go Ok-> Ok-> Ok->. Restart. To Test The Compiler, I Enter gcc -v. I got This Error: "gcc -v" is not recognize as internal or external command.
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: While Building Program
That sounds exactly right.
In the console window, enter "set PATH". This should display the current content of PATH. Check that the correct path was added. Entries must be separated by a semicolon ";".
If the path is set correctly, check if the path c:\mingw\bin actually exists and if gcc (and lots of other stuff) is in there.
Alternatively you can install MinGW separately. I suggest to use TDM-GCC as it's known to work with wxWidgets.
http://tdm-gcc.tdragon.net/
In the console window, enter "set PATH". This should display the current content of PATH. Check that the correct path was added. Entries must be separated by a semicolon ";".
If the path is set correctly, check if the path c:\mingw\bin actually exists and if gcc (and lots of other stuff) is in there.
Alternatively you can install MinGW separately. I suggest to use TDM-GCC as it's known to work with wxWidgets.
http://tdm-gcc.tdragon.net/
Use the source, Luke!
Re: While Building Program
How Many Path Variable Do I Need There? The Path Variable That I Found There Are: C:\Program Files\Mcrosoft Web Installer, I Added This: C:\MinGw\bin Then, Are There Other Path Variable That I Must Add There? Thanks.Check That The Correct Path Was Added. Entries Must Be Seperated By Semicolon ";"
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1