Author Topic: missing wx/setup.h  (Read 6975 times)

Offline PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: missing wx/setup.h
« Reply #15 on: December 13, 2022, 09:03:20 pm »
I am not saying my guide is perfect (and it is overly detailed if all one is looking for is to copy&paste a build command line) but I am unaware of introducing any terminology that should be new to a beginner-level C++ programmer who is also a MS Windows user.

I also believe that reading the guide is not something that should be split in weeks. Reading it, installing a compiler, downloading and building wxWidgets, and finally having a template C::B project running should not take more than an hour (assuming a decent internet connection and PC configuration).
« Last Edit: December 13, 2022, 09:54:23 pm by PB »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: missing wx/setup.h
« Reply #16 on: December 14, 2022, 06:35:37 pm »
The problem is now with basic  build commands  (your listing 3.1).
I am not putting this on drive c:, but on drive r. 'I modified your batch file commands, and entered them one by one. My wxwin path is set correctly , but there is something a bit adrift. I've put below a listing of the cmd  lines, and replies. I found I had to put in the full path names, but it does not recognize the 'makefile.gcc',, but it copied one file OK. Although iIhave used makefiles before, I've never actually looked into them, but if they simply move existing files to another directory, then if it is not found, then maybe I could do it manually. Anyway, here is a copy of the command line (shift delete and pasted into notepad.)

Quote
C:\Users\Ray>cd /d %WXWIN%\build\MSW

R:\wxWidgets-3.2.1\build\msw>mingw32-make -f makefile.gcc SHARED=1 BUILD=debug SHELL=cmd.exe
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.

R:\wxWidgets-3.2.1\build\msw>R:\msys64\mingw64\bin\mingw32-make -f makefile.gcc SHARED=1 BUILD=release SHELL=cmd.exe
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
        1 file(s) copied.
if not exist ..\..\lib\gcc_dll\mswu\wx\msw mkdir ..\..\lib\gcc_dll\mswu\wx\msw
gcc -E  "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h"
'gcc' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make: *** [makefile.gcc:5987: ..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h] Error 1

R:\wxWidgets-3.2.1\build\msw>R:\msys64\mingw64\bin\mingw32-make -f R:\wxWidgets-3.2.1\build\msw\makefile.gcc SHARED=1 BUILD=release SHELL=cmd.exe
gcc -c -o gcc_mswudll\wxregex_pcre2_auto_possess.o  -O2 -mthreads -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -I..\..\3rdparty\pcre\src\wx -D__WX__ -DHAVE_CONFIG_H -D_UNICODE   -MTgcc_mswudll\wxregex_pcre2_auto_possess.o -MFgcc_mswudll\wxregex_pcre2_auto_possess.o.d -MD -MP ../../3rdparty/pcre/src/pcre2_auto_possess.c
'gcc' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make: *** [R:\wxWidgets-3.2.1\build\msw\makefile.gcc:6032: gcc_mswudll\wxregex_pcre2_auto_possess.o] Error 1

R:\wxWidgets-3.2.1\build\msw>
R:\wxWidgets-3.2.1\build\msw>set wxwin
WXWIN=R:\wxWidgets-3.2.1


There are numerous makefile.gcc, so hopefully I've got the right one, and have not made a typo.

If it is something within the make files, that perhaps expects to be built on drive c, not any drive, then I will have to most likely find space on c.  (both are relatively small ssd's)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: missing wx/setup.h
« Reply #17 on: December 14, 2022, 06:50:50 pm »
You should, at least add R:\msys64\mingw64\bin to your PATH system variable.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: missing wx/setup.h
« Reply #18 on: December 14, 2022, 08:07:58 pm »
You should, at least add R:\msys64\mingw64\bin to your PATH system variable.
Which is, of course, described in my guide and done in the provided build batch files.

However, I am not sure if the OP installed MSYS2 to R: drive as well.
« Last Edit: December 14, 2022, 08:13:13 pm by PB »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: missing wx/setup.h
« Reply #19 on: December 14, 2022, 11:21:36 pm »
mysys2.exe is in R:\mysys64.  I was pretty sure I set the path, but just done it again, with same result.
Quote
R:\wxWidgets-3.2.1\build\msw>set path=r:\mysys64\mingw64\bin%path%

R:\wxWidgets-3.2.1\build\msw>
R:\wxWidgets-3.2.1\build\msw>R:\msys64\mingw64\bin\mingw32-make -f R:\wxWidgets-3.2.1\build\msw\makefile.gcc SHARED=1 BUILD=release SHELL=cmd.exe
gcc -c -o gcc_mswudll\wxregex_pcre2_auto_possess.o  -O2 -mthreads -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -I..\..\3rdparty\pcre\src\wx -D__WX__ -DHAVE_CONFIG_H -D_UNICODE   -MTgcc_mswudll\wxregex_pcre2_auto_possess.o -MFgcc_mswudll\wxregex_pcre2_auto_possess.o.d -MD -MP ../../3rdparty/pcre/src/pcre2_auto_possess.c
'gcc' is not recognized as an internal or external command,
operable program or batch file.

In my previous post, it did seem to work for one file copy. The mingw32-make.exe is in the >R:\msys64\mingw64\bin directory, and also an empty file named mingw32-make  (no .exe extension) Not sure what that means. Is there code in the makes that have the drive letters predefined? I have the folder R:\wxWidgets-3.2.1\lib\gcc_dll  with only the mswu folder, and a couple of virtually empty folders within that mswu. I've had this 'copy one file only in the make' situation before.

Offline PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: missing wx/setup.h
« Reply #20 on: December 15, 2022, 07:36:05 am »
mysys2.exe is in R:\mysys64.  I was pretty sure I set the path, but just done it again, with same result.
Quote
R:\wxWidgets-3.2.1\build\msw>set path=r:\mysys64\mingw64\bin%path%
Are you sure your default PATH starts with a semicolon? If not, then the command above does NOT set the correct path to GCC (i.e., you are missing a semicolon between "bin" and "%path%").

Why not just use tested working commands available, modified for your path? In other words, do not retype the commands you think are correct, copy and paste them, adjust the path, check they are correct and then run them.

There is no reason to use full path to the make executable or the makefile itself.

Lastly, read the error messages and try to understand them. By doing this, you will have a chance to figure the problem by yourself.

For example, in one of your previous posts, the system told you "'mingw32-make' is not recognized as an internal or external command" yet you assumed there is an issue with a makefile. In your last post, it is clear that the issue not just with GCC but also with make since you had to use a full path; this means that you did not set PATH correctly.

BTW, all issues so far have nothing to do with wxWidgets, Code::Blocks, or my guide; it's just the most basic C++ / Windows knowledge.
« Last Edit: December 15, 2022, 07:47:06 am by PB »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: missing wx/setup.h
« Reply #21 on: December 15, 2022, 12:19:07 pm »
Well spotted wrt the semi-colon. I think I mentioned earlier that it may be a typo. I did not want to mess with your batch files. Anyway, I have now run your build -library-shared.bat, however i was disappointed that after possibly an hour of build, it merely finished. I would have expected a rendition of the National Anthem, and setting off of fireworks! (Misleadingly, that window closed, leaving my previous one with the error messages showing...)
All the files appear to be present in gcc-dll folder, I will run your minimal sample test.
I want to install the static build version, if that can coexist with the debug/release versions. Do I just delete the two folders you mention  in cleaning the gcc builds, and run the static build batch file?


Offline PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: missing wx/setup.h
« Reply #22 on: December 15, 2022, 12:29:10 pm »
Anyway, I have now run your build -library-shared.bat, however i was disappointed that after possibly an hour of build, it merely finished.
Had you followed the advice I gave in the guide and even repeated here (i.e., use the parallel build), it should have taken much less time.

Misleadingly, that window closed, leaving my previous one with the error messages showing...)
I do not see what is misleading about the window with successful build closing, as described in the guide and the batch file, the window is left open only when the build fails, so the build error messages remain available.

I want to install the static build version, if that can coexist with the debug/release versions. Do I just delete the two folders you mention  in cleaning the gcc builds, and run the static build batch file?
You are mixing two things here, static/shared (affected by the value of the build parameter "SHARED") and debug/release (affected by the value of the build parameter "BUILD"). They are used together, you cannot have one without other, e.g. you can have a static debug build, a shared release build, and/or any other of the four possible combinations. They do not affect each other. As described in the guide, the libraries for the debug build have an extra "d" in their name so they can coexist in the same folder with the release libraries. Also as described there, static builds are by default generated in "WXDIR/lib/gcc_lib" while the shared ones in "WXDIR/lib/gcc_dll".

You said that my guide is overly detailed for you, but as you can see, in the end you still need to know about all these supposed "details". Had you read the guide, you wouldn't have to ask and could have saved time and effort.

Anyway, I will not nag at you anymore, it seems that that I am either unable to properly explain even the most basic things or the communication between the two of us is somehow utterly broken.

Considering that doing the things described in my guide is actually the easy part and the difficult one comes with the programming itself, I can only wish you good luck.
« Last Edit: December 15, 2022, 01:15:36 pm by PB »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: missing wx/setup.h
« Reply #23 on: December 15, 2022, 04:40:39 pm »
I don't see our communication as being broken. I ask a question, you point me in the right direction. When, earlier, I said that your guide was too complicated for me,( or whatever), that is not a reflection on your guide, but the fact that I had hoped that the whole installation to be simpler., my not knowing what was involved in getting wxWidgets to link statically.

Anyway, thanks for your help, the minimal build example works fine on my system.