Compiling Samples
Compiling Samples
Sorry for the basic question, but I searched and could not find an answer.
What is the procedure for building the sample apps on Linux? Trying this (which seems obvious) fails:
make -f makefile.gcc
if not exist gcc_mswud mkdir gcc_mswud
make: -c: Command not found
makefile.gcc:219: recipe for target 'gcc_mswud' failed
make: [gcc_mswud] Error 127 (ignored)
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\display_sample_rc.o --define __WXMSW__ --define _
UNICODE --include-dir .\..\..\lib\gcc_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../s
amples --define NOPCH
make: -c: Command not found
makefile.gcc:234: recipe for target 'gcc_mswud\display_sample_rc.o' failed
make: *** [gcc_mswud\display_sample_rc.o] Error 127
I'm using wxWidgets 3.0.4 on Ubuntu Linux.
What is the procedure for building the sample apps on Linux? Trying this (which seems obvious) fails:
make -f makefile.gcc
if not exist gcc_mswud mkdir gcc_mswud
make: -c: Command not found
makefile.gcc:219: recipe for target 'gcc_mswud' failed
make: [gcc_mswud] Error 127 (ignored)
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\display_sample_rc.o --define __WXMSW__ --define _
UNICODE --include-dir .\..\..\lib\gcc_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../s
amples --define NOPCH
make: -c: Command not found
makefile.gcc:234: recipe for target 'gcc_mswud\display_sample_rc.o' failed
make: *** [gcc_mswud\display_sample_rc.o] Error 127
I'm using wxWidgets 3.0.4 on Ubuntu Linux.
Re: Compiling Samples
Hi,
Did you build the library yourself or installed it from the repository?
Thank you.
Did you build the library yourself or installed it from the repository?
Thank you.
Re: Compiling Samples
I built it myself. I is correctly built and installed.
Re: Compiling Samples
I am MSW only but I believe those makefiles are MSW only? I.e., the makefile for the samples is basically the equivalent of that for the library in WXWIN/build/msw; in fact the samples makefile.gcc actually includes the MSW config.gcc.
Did you try something like described here (using makefile produced by configure)
https://wiki.wxwidgets.org/Compiling_an ... stallation
Re: Compiling Samples
@PB,
Yes, that's right.
@OP:
How did you build it?
To build the library for *nix you do:
Then in order to build the samples you do:
If you are trying to cross-compile, please show how did you build the library.
Thank you.
Yes, that's right.
@OP:
How did you build it?
To build the library for *nix you do:
Code: Select all
cd wxWidgets
mkdir buildGTK
cd buildGTK
../configure --enable-debug --with-gtk
make
Code: Select all
cd samples
make
Thank you.
Re: Compiling Samples
Thanks that was it. I have it building now.
Re: Compiling Samples
I very new to programming and I start to study wxwidgets library and found it very interesting.
I also successfully compiled all files with make like was mentioned above.
I received such files in some directory ../wxWidgets-3.2.0/buildGTK/samples/menu :
- menu_menu.o
- menu (no extension)
- Makefile (no extension)
But what next? How to run that program to see example how it works?
I also successfully compiled all files with make like was mentioned above.
I received such files in some directory ../wxWidgets-3.2.0/buildGTK/samples/menu :
- menu_menu.o
- menu (no extension)
- Makefile (no extension)
But what next? How to run that program to see example how it works?
Re: Compiling Samples
Hi,
Which OS do you have What Window Manager?
You can try to run the sample by opening the default "Files" application under GNOME, navigate to the folder and click on the "menu" file or from the Terminal type "./menu" (no quotes).
Thank you.
Which OS do you have What Window Manager?
You can try to run the sample by opening the default "Files" application under GNOME, navigate to the folder and click on the "menu" file or from the Terminal type "./menu" (no quotes).
Thank you.
Re: Compiling Samples
Thank you very much, it works from terminal.
I use Linux mint 20.3
Does it possible to change this program to make some executable to run it by mouse click?
I use Linux mint 20.3
Does it possible to change this program to make some executable to run it by mouse click?
Re: Compiling Samples
Hi,
You don't need to change anything.
Just open the standard Files GNOME application, navigate to that folder and double click the executable.
Thank you.
You don't need to change anything.
Just open the standard Files GNOME application, navigate to that folder and double click the executable.
Thank you.
Re: Compiling Samples
Strange, but I receive:
"Unknown file type. The file "menu" has no known programs associated with it. Use the Open With dialog to pick a program to open it with"
Properties -> permisions -> "Allow executing file as program" = Enabled.
As file manager Nemo 5.2.4 is used.
"Unknown file type. The file "menu" has no known programs associated with it. Use the Open With dialog to pick a program to open it with"
Properties -> permisions -> "Allow executing file as program" = Enabled.
As file manager Nemo 5.2.4 is used.