News:

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

Main Menu

wxWidgets 2.8.12 Compile Error

Started by spflanze, May 02, 2019, 06:34:27 AM

Previous topic - Next topic

spflanze

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:

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:
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?

Miguel Gimenez

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.

spflanze

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:
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.

stahta01

Have you verified the "g++" command exists?

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

spflanze

#4
The command:
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.

sodev

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?

spflanze

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.

stahta01

Quote from: spflanze 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.

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

spflanze

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?

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

BlueHazzard

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...

spflanze

#11
Quote from: stahta01 on May 04, 2019, 05:46:03 AM
http://forums.next.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.

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

spflanze

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.next.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:
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:
CodeBlocks.cbp
CodeBlocks_wx31_64.cbp

My initial inclination is to use CodeBlocks_wx31_64.cbp. But what is CodeBlocks.cbp there for?

sodev

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.