While Building Program

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
User avatar
Chikwado
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Sep 25, 2017 5:40 pm
Location: Nigeria

While Building Program

Postby Chikwado » Tue Oct 03, 2017 10:44 am

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.

User avatar
doublemax
Moderator
Moderator
Posts: 11386
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: While Building Program

Postby doublemax » Tue Oct 03, 2017 5:58 pm

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.
Use the source, Luke!

User avatar
Chikwado
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Sep 25, 2017 5:40 pm
Location: Nigeria

Re: While Building Program

Postby Chikwado » Fri Oct 06, 2017 4:30 pm

I Found The Example From This Source: Example1 and Example2. I am completely new to all this stuff. I Need Help.

User avatar
doublemax
Moderator
Moderator
Posts: 11386
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: While Building Program

Postby doublemax » Fri Oct 06, 2017 5:58 pm

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.
Use the source, Luke!

User avatar
Chikwado
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Sep 25, 2017 5:40 pm
Location: Nigeria

Re: While Building Program

Postby Chikwado » Mon Oct 09, 2017 7:44 am

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.

User avatar
doublemax
Moderator
Moderator
Posts: 11386
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: While Building Program

Postby doublemax » Mon Oct 09, 2017 10:35 am

Now What Do I Have To Type In Command Line To Start The Compiling Proccess?
The link i posted was for Linux. Ff you're under Windows, this should help:
https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW
Use the source, Luke!

User avatar
Chikwado
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Sep 25, 2017 5:40 pm
Location: Nigeria

Re: While Building Program

Postby Chikwado » Mon Oct 09, 2017 1:42 pm

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.

User avatar
doublemax
Moderator
Moderator
Posts: 11386
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: While Building Program

Postby doublemax » Mon Oct 09, 2017 6:03 pm

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:

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

If that compiles wxWidgets successfully, continue here:
viewtopic.php?p=169501&sid=8b310aedd3983eb061b59b23aad01393#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!

User avatar
Chikwado
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Sep 25, 2017 5:40 pm
Location: Nigeria

Re: While Building Program

Postby Chikwado » Tue Oct 10, 2017 2:54 pm

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.

User avatar
doublemax
Moderator
Moderator
Posts: 11386
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: While Building Program

Postby doublemax » Tue Oct 10, 2017 4:05 pm

Would I Have To Type Those Code In Command Line And Go "ENTER"
Yes. Make sure to "navigate" to the correct directory first.

In case you don't know how to do that: http://www.colorado.edu/geography/gcraf ... html#chdir
Use the source, Luke!


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 5 guests