User forums > Using Code::Blocks
Path, include, directory.
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.
--- Code: ----------------- 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))
--- End code ---
skoroglyadov:
Attach
skoroglyadov:
Atach
gd_on:
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).
skoroglyadov:
Thank you, I changed the paths, now I'm not looking for wx/setup.h
Navigation
[0] Message Index
[#] Next page
Go to full version