News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Path, include, directory.

Started by skoroglyadov, November 24, 2022, 12:07:21 PM

Previous topic - Next topic

skoroglyadov

Hello everyone When adding paths to the search directory, new undiscovered files appear, although they are located in the same directory.
I will be grateful for your help.

-------------- Build: Release in jj (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -O2 -I..\..\wxWidgets\include\wx -I..\..\wxWidgets\include\wx -c C:\pro\jj\jjApp.cpp -o obj\Release\jjApp.o
g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -O2 -I..\..\wxWidgets\include\wx -I..\..\wxWidgets\include\wx -c C:\pro\jj\jjMain.cpp -o obj\Release\jjMain.o
windres.exe -IC:\wxWidgets\include\wx -I..\..\wxWidgets\include\wx  -J rc -O coff -i C:\pro\jj\resource.rc -o obj\Release\resource.res
g++.exe -LC:\wxWidgets\lib\gcc_dll -o bin\Release\jj.exe obj\Release\jjApp.o obj\Release\jjMain.o  obj\Release\resource.res -s -mthreads  -lwxmsw31 -mwindows
In file included from C:\pro\jj\jjApp.cpp:10:
C:\pro\jj\jjApp.h:13:10: fatal error: wx/app.h: No such file or directory
#include <wx/app.h>
          ^~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))

In file included from C:\pro\jj\jjMain.cpp:10:
C:\pro\jj\jjMain.h:14:10: fatal error: wx/button.h: No such file or directory
#include <wx/button.h>
          ^~~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))



skoroglyadov


skoroglyadov


gd_on

#3
If in your search path for the compiler you have wxWidgets\include\wx then as in your program you hane #include <wx\app.h> the real searched file is wxWidgets\include\wx\wx\app.h, which is not correct.
In your global variable, simply use C:\wxWidgets. It is not necessary to add the include path because it is done automaticcaly by C::B.
Same problem in the project ..\..\wxWidgets\include\wx. It's redundant with the global definition (and \wx should be deleted).
In your project configuration, don't forget to add the global path by $(#WXWIDGETS)\include [or  $(#WXWIDGETS.include)]: it's better than redefining the whole relative path (particularly if you move your project).
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

skoroglyadov

Thank you, I changed the paths, now I'm not looking for wx/setup.h

gd_on

That's because you also need to set $(#WXWIDGETS)\lib\gcc_dll\mswu in the compiler search directories, where normally this wx\setup.h has been created when you built wxWidgets.
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

skoroglyadov

#6
Thank you, everything works! I would also add that wx/setup.h works with unicode enabled.