Author Topic: wxWidgets 2.8.12 Compile Error  (Read 7221 times)

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
wxWidgets 2.8.12 Compile Error
« on: May 02, 2019, 06:34:27 am »
Following the directions at:
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows

I removed the C:\TDM-GCC-64\bin; path from Windows 7 PATH variable. I added the paths C:\MinGW\bin;C:\MinGW\mingw32\bin;
I attempted to compile wxWidgets 2.8.12 so that I could compile the latest SVN version of Code::Blocks.

I executed this command sequence in Windows 7's cmd.exe terminal emulator:
Code
cd C:\wxMSW-2.8.12\build\msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

The compilation ended with this error:
Code
process_begin: CreateProcess(NULL, g++ -c -o gcc_mswudll\monodll_dummy.o -O2 -mt
hreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I..\..\lib\gcc_dll\mswu
-I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff -I..\..\src\jpeg -I..\..\
src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_BASE=1
-DWXMAKINGDLL -Wno-ctor-dtor-privacy -MTgcc_mswudll\monodll_dummy.o -MFgcc_mswud
ll\monodll_dummy.o.d -MD -MP ../../src/common/dummy.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
makefile.gcc:4717: recipe for target 'gcc_mswudll\monodll_dummy.o' failed
mingw32-make: *** [gcc_mswudll\monodll_dummy.o] Error 2

Where did this go wrong?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1557
Re: wxWidgets 2.8.12 Compile Error
« Reply #1 on: May 02, 2019, 01:57:12 pm »
This happened to me some years ago. IIRC this CreateProcess issue occurs only when you are mixing MSYS and CMD environments. Also recheck your path (you can remove C:\MinGW\mingw32\bin). When changing the path (in the desktop) you must close and reopen the CMD window for the change to take effect.

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #2 on: May 03, 2019, 03:51:08 am »
I was using CMD aka Window 7's terminal emulator. So I tried it in MSYS. In the MSYS terminal emulator I did this command sequences:
Code
export PATH=$PATH:/c/MinGW/bin;
export PATH=$PATH:/c/MinGW/mingw32/bin;
cd C:/wxMSW-2.8.12/build/msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

Compilation terminated with the same error.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #3 on: May 03, 2019, 04:42:17 am »
Have you verified the "g++" command exists?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #4 on: May 03, 2019, 05:36:53 am »
The command:
Code
g++ --help
gets the expected response. The error it terminates on appears after many successful executions of the g++ command. So for sure it does exist.

From what I can interpret of the error message there is a file it seems to expect named  dummy.cpp that it cannot find.
« Last Edit: May 03, 2019, 05:44:20 am by spflanze »

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: wxWidgets 2.8.12 Compile Error
« Reply #5 on: May 03, 2019, 05:57:39 am »
The Makefiles have a long outstanding bug that they cant create the required directory structure in the output directory, you have to create it yourself. Out of memory it should be something like mswu[d]\wx\msw in the lib and dll output directory.

Also is there any specific reason why you compile that ancient wxWidgets version?

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #6 on: May 04, 2019, 02:31:11 am »
I want to compile the ancient wxWidgets version so I can compile a 64 bit Code::Blocks. I decided I should compile a 32 bit version before the additional complication 64 bits.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #7 on: May 04, 2019, 03:55:55 am »
I want to compile the ancient wxWidgets version so I can compile a 64 bit Code::Blocks. I decided I should compile a 32 bit version before the additional complication 64 bits.

So, you are wasting your time. Note: wxWidgets 2.8.12 is only 32 bit under Windows OS.

NOTE: It is easier to build 64 bit apps than it is to build 32 bit apps.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #8 on: May 04, 2019, 05:21:05 am »
I chose wxWidgets 2.8.12 because that is what Code::Blocks 17.12 (the current stable release) was built with.

Can Code::Blocks be built with a more recent version of wxWidgets, and one with which a 64 bit version of Code::Blocks can be built?

What version of wxWidgets are the Code::Blocks nightly builds being built with?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxWidgets 2.8.12 Compile Error
« Reply #10 on: May 05, 2019, 01:53:55 pm »
I compiled wxWidgets endless times on windows and never had a message like this...
Do you have a mix of compilers in your PATH? PATH hygiene is very difficult today, because every compiler puts itself into it...
I for myself remove all compiler paths and add them manualy per cmd if i need to compile something...

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #11 on: May 07, 2019, 05:21:54 am »
http://forums.codeblocks.org/index.php/topic,3299.0.html

I downloaded mingw-w64-install.exe from:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

This installation file gives me several options for Version, Architecture, Threads, Exception, and Build revison.

For Version I set the latest version I saw on the page you provided the link for, which is 8.1.0.

For Architecture I set x86_64 because I desire to build a 64 bit Code::Blocks.

Build revision gives me only one choice, which is 0, so that is an easy choice.

I do not know what to choose in the Threads, and Exception, selection boxes. Should these be left at default?

The choices for Threads are posix, and win32. The default is posix.

The choices for Exception is seh, and sjlj. The default is seh.

My OS is a 64 Bit Windows 7.
« Last Edit: May 08, 2019, 01:19:19 am by spflanze »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #12 on: May 07, 2019, 05:43:13 am »
64 bit normally uses seh for Exception so that is correct; no idea on threading which answer is best for building C::B or wxWidgets.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: wxWidgets 2.8.12 Compile Error
« Reply #13 on: May 14, 2019, 06:55:34 am »
I proceeded to install with the default options. After the current version of the dlls were copied to the same directory the codeblocks.exe was in, as instructed here:
http://forums.codeblocks.org/index.php?topic=3232.0
I got svn build rev 11628 released on 2019-04-16 working.

I downloaded the version codeblocks-code-r11687-trunk version from svn. In the Code::Blocks File dialog I went to that version's src directory and found these project files:
Code
CodeBlocks.cbp
CodeBlocks_wx30.cbp
CodeBlocks_wx30_64.cbp
CodeBlocks_wx30-unix.cbp
CodeBlocks_wx31.cbp
CodeBlocks_wx31_64.cbp
CodeBlocks-unix.cbp
and their associated workspaces of similar names.

I have 64 bit Windows 7, and I want to develop applications using wxWidgets 3.1.2. So that narrows the choices to:
Code
CodeBlocks.cbp
CodeBlocks_wx31_64.cbp
My initial inclination is to use CodeBlocks_wx31_64.cbp. But what is CodeBlocks.cbp there for?

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: wxWidgets 2.8.12 Compile Error
« Reply #14 on: May 14, 2019, 08:15:59 am »
These workspaces and project files are for building CodeBlocks itself and dont limit you what applications you can build with CodeBlocks (except the issues with the debugger which requires a matching architecture).

Luckily these days CodeBlocks works stable with wxWidgets 3.1.x (with my 2 patches that rot on the issue tracker even with all compatibility options disabled) so pick one of these. The untagged variant should be the wxWidgets 2.8 variant.