0

I have tried to build a simple wxWidgets program on macOS using CodeLite.

Error I get is

/bin/sh -c '/usr/bin/make -j4 -e -f  Makefile'
----------Building project:[ wksp-1 - Debug ]----------
make[1]: wx-config: Command not found
make[1]: wx-config: Command not found
make[1]: wx-config: Command not found
/usr/bin/g++  -c  "/Users/WorkFolder/Developer/wxWidgets-3.0.5/wksp-1/wksp-1/main.cpp" -g -O0 -Wall   -o ../build-Debug/wksp-1/main.cpp.o -I.
/Users/WorkFolder/Developer/wxWidgets-3.0.5/wksp-1/wksp-1/main.cpp:1:10: fatal error: 'wx/wx.h' file not found
#include <wx/wx.h>
         ^~~~~~~~~
1 error generated.
make[1]: *** [../build-Debug/wksp-1/main.cpp.o] Error 1
make: *** [All] Error 2
====2 errors, 0 warnings====

I have wxWidgets installed in a particular folder and I have run "make" it in the same folder.

Vibhor
  • 35
  • 6
  • 2
    Add `wx-config` to your `PATH` env variable – malat Jul 03 '20 at 06:49
  • I am a new to setting environment variables, paths etc. Could you please elaborate? – Vibhor Jul 03 '20 at 08:06
  • @Vibhor, in which directory did you install/build wxWidgets? All you need tio do is find where wx-config is referenced in your project and prepend the `wx-config` command with that path... – Igor Jul 03 '20 at 18:51
  • thank you Igor. I added directory path to Compiler->Include Path and Linker->Libraries search path. I am getting " No Target! You should use wx-config program for compilation flags! " apart from " make[1]: wx-config: Command not found " – Vibhor Jul 04 '20 at 11:55
  • 1
    @Vibhor, do not add it as a path. Just change `wx-config` to `/path/to/wx-config/script/wx-config`. – Igor Jul 04 '20 at 14:15
  • thank you Igor and mallet. It works. May seem basic to you but this is huge help. I was struggling with this for over a week now. – Vibhor Jul 04 '20 at 16:53

0 Answers0