Author Topic: Errors building with mingw  (Read 6578 times)

CDarcey

  • Guest
Errors building with mingw
« on: August 15, 2007, 03:22:28 am »
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 ?

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Errors building with mingw
« Reply #1 on: August 15, 2007, 03:27:55 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

  • Guest
Re: Errors building with mingw
« Reply #2 on: August 15, 2007, 05:12:49 am »
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 ?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Errors building with mingw
« Reply #3 on: August 15, 2007, 05:24:16 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.

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

  • Guest
Re: Errors building with mingw
« Reply #4 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.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Errors building with mingw
« Reply #5 on: August 15, 2007, 07:57:09 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).
Code
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

  • Guest
Re: Errors building with mingw
« Reply #6 on: August 16, 2007, 04:51:45 am »
Success!. Thank you for the assistance, especially appreciated as this turned to be dumb user with wxWidgets and Code::Blocks the inocent victim.

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Errors building with mingw
« Reply #7 on: August 16, 2007, 08:19:57 am »
Hi !

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