0

I build the wxWidgets library with the --disable-shared option and then compile the Hello-world sample code using:

g++ test_00.cpp `wx-config --libs --cxxflags --static=yes` -o test_00

The file is executable from terminal. Then I run chmod +x test_00 in the terminal. However double clicking on that file gives me this error:

img

What can I do to make it executable with double click?

CaTx
  • 1,421
  • 4
  • 21
  • 42

1 Answers1

0

Found the answer here. The file must be compiled using:

g++ test_00.cpp `wx-config --libs --cxxflags --static=yes` -o test_00 -no-pie

Afterwards, it is executable with double-click. No chmod required.

CaTx
  • 1,421
  • 4
  • 21
  • 42