FAQ for IDE related issues v2 Topic is solved

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.
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

I think this could go in a separate thread, it's awkward to solve problems in a sticky note.

I think you're trying to run the clean target. Is there a reason? If you want to build wx then the clean target is not what you want.

Also, I see you're using an absolute path to ming32-make; maybe you'll want to edit your PATH environment variable instead, since other tools from Mingw will likely be invoked by the makefile, and the makefile will not use absolute paths. So you need to make sure the right executables for mingw will be found even without specifying absolute paths. (IIRC; unless mingw32-make does some dark magic I'm not aware of)
"Keyboard not detected. Press F1 to continue"
-- Windows
blaroche
In need of some credit
In need of some credit
Posts: 7
Joined: Thu Jun 10, 2010 9:04 am
Location: Germany

Post by blaroche »

I was using clean because I just copy-pasted the command from a website. I cannot find a standard set of instructions, so I have to try various things from here and there.

I don't know why, but CodeBlocks did not add in my PATH env. var. the path to mingw when it was installed. Anyway, I did that manually.

I tried this again:

Code: Select all

c:\wxWidgets-2.8.11\build\msw>mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
And got this:

Code: Select all

if not exist gcc_mswudll mkdir gcc_mswudll
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswudll mkdir gcc_mswudll", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [gcc_mswudll] Error 2 (ignored)
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [..\..\lib\gcc_dll] Error 2

At least this time, it did not go on for hundreds of lines. That was the only output.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: FAQ for IDE related issues v2

Post by stahta01 »

I normally use three lines to build wxWidgets using MinGW GCC
The first changes the system path so my compiler is at the start
The second changes the current directory to be build/msw
The third does the make command.

What I guess you need to use.

Code: Select all

    SET PATH=C:\Program Files (x86)\CodeBlocks\MinGW\bin;%PATH%
    cd c:\wxWidgets-2.8.11\build\msw
    mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
Gnawer
Experienced Solver
Experienced Solver
Posts: 65
Joined: Thu Jun 29, 2006 11:10 am
Location: Ahlen, Germany

Re: FAQ for IDE related issues v2

Post by Gnawer »

MSVC 2010 Professional, wxWidgets-2.9.4 sources downloaded from sourceforge
libraries cannot be build

The most interesting question is still open:
How can this error "Cannot open include file: "wx/setup.h" be resolved?
The tricks described above seem to be obsolete.
After 2 hours of trial and error I give up.
Help would be very appreciated.
Best regards
Gnawer
Jive Dadson
Experienced Solver
Experienced Solver
Posts: 60
Joined: Thu Sep 06, 2012 8:00 pm

Re: FAQ for IDE related issues v2

Post by Jive Dadson »

I just got through fighting this one for, I think, the third time. A few years will pass and I will need to upgrade wxWidgets again, and I will have forgotten again. I think it is a rite of passage for Windoze captives.

Here's what you do. Reverse any changes you might have made to source files and include files, or re-install them. You should find setup.h in wxWidgets/include/msvc/wx. If not, grab the windows headers from sourceforge:wxWidgets-2.9.4_Headers.7z. Copy setup.h into WxWidgets/include/wx. Make a copy of this message and put it in a README-and-I-mean-it.txt file in your project directory.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: FAQ for IDE related issues v2

Post by stahta01 »

Building 32 bit wxWidgets using MinGW.org based Compiler ( in this case it was TDM 10.3.0 ) requires the build option CPPFLAGS="-Wno-error=narrowing" because by default it errors out on narrowing [-Wnarrowing] warnings.

See viewtopic.php?f=19&p=207179#p207179 for more information.



Tim S.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: FAQ for IDE related issues v2

Post by PB »

I think this topic should be unstickied. IMO, it contains mostly information that is outdated, irrelevant (e.g., building on command line), or incorrect (copying setup.h).
Locked