News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Errors building with mingw

Started by CDarcey, August 15, 2007, 03:22:28 AM

Previous topic - Next topic

CDarcey

I have installed current copies for Code:Blocks, wxWidgets, minGW and MSys.
I used the wizard to start a wxWidgets project using wxSmith, frame based.
Select all three options in wxWidgets Library Settings and use precompiled headers.
This produced 2 errors "A matching Debug/Release configuration...." I ignored these.
Added a wxgridsizer and wxGrid to the frame.
Build first came up with error: Platform.h (196) wx/setup.h not found.
I copied setup.h from wx/msw to try this out.
This seemed to fix the problem, but the linker then failed with: ld.exe  cannot find -lwxmsww28ud.

Can anyone advise on what I am doing wrong, or how this might be resolved ?

JGM

Quote from: CDarcey on August 15, 2007, 03:22:28 AM
This seemed to fix the problem, but the linker then failed with: ld.exe  cannot find -lwxmsww28ud.

You have to add wxmsww28ud library to the project linker settings by pointing the directory that had it after you compiled wxWidgets. Usually wxdir\lib\gcc_dll or something like that.

CDarcey

Thanks for the response. There does not appear to be a directory of this name (or anything like it), I installed wxWidgets by downloading and running wxMSW-2.8.4-Setup.exe. Is there some other step required after this ?

Biplab

Quote from: CDarcey on August 15, 2007, 03:22:28 AM
This produced 2 errors "A matching Debug/Release configuration...." I ignored these.

Don't ignore these warnings unless you know exactly what you are doing. The warnings are pointing towards the possible wrong wx configurations.

Quote from: CDarcey on August 15, 2007, 03:22:28 AM
Can anyone advise on what I am doing wrong, or how this might be resolved ?

You've downloaded the source of wxWidgets. You've to compile it first. :)
Be a part of the solution, not a part of the problem.

CDarcey

OK this is making sense, I did not realise that this build step was necessary until searching for instructions on howto.
Question: can you point me to some instructions for compiling wxWidgets using minGW that work. I have found a couple but these refer to v2.6.4 and fail anyway.

Biplab

Quote from: CDarcey on August 15, 2007, 07:32:38 AM
OK this is making sense, I did not realise that this build step was necessary until searching for instructions on howto.
Question: can you point me to some instructions for compiling wxWidgets using minGW that work. I have found a couple but these refer to v2.6.4 and fail anyway.

Remove reference to MSYS (C:\msys\1.0\bin) from PATH. Now open a command prompt and change the current directory to <wx-dir>\build\msw. Now issue the following command (an example).
mingw32-make -f makefile.gcc BUILD=release SHARED=1 UNICODE=1 MONOLITHIC=1
If everything is ok, it will take about 15-20 mins (approx).
Be a part of the solution, not a part of the problem.

CDarcey

Success!. Thank you for the assistance, especially appreciated as this turned to be dumb user with wxWidgets and Code::Blocks the inocent victim.

dje

Hi !

Quote from: CDarcey on August 15, 2007, 03:22:28 AM
Build first came up with error: Platform.h (196) wx/setup.h not found.
I copied setup.h from wx/msw to try this out.

I don't know if you still have your copy, but normally, wxWidgets build process copies setup.h in a directory and you have to put this directory in the search directories of the project settings of the compiler. This directory is for me :
C:\DevSofts\wxWidgets-2.8.4\lib\gcc_dll\mswu\wx where
where mswu may be replaced by msw$(SUFFIX) to be more portable

Dje