Compiling Samples

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
weswitt
Earned a small fee
Earned a small fee
Posts: 22
Joined: Thu Dec 29, 2016 10:45 pm

Compiling Samples

Post by weswitt » Mon Mar 11, 2019 2:30 pm

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.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4425
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compiling Samples

Post by ONEEYEMAN » Mon Mar 11, 2019 2:44 pm

Hi,
Did you build the library yourself or installed it from the repository?

Thank you.

weswitt
Earned a small fee
Earned a small fee
Posts: 22
Joined: Thu Dec 29, 2016 10:45 pm

Re: Compiling Samples

Post by weswitt » Mon Mar 11, 2019 3:01 pm

I built it myself. I is correctly built and installed.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2572
Joined: Sun Jan 03, 2010 5:45 pm

Re: Compiling Samples

Post by PB » Mon Mar 11, 2019 3:23 pm

weswitt wrote:
Mon Mar 11, 2019 2:30 pm
What is the procedure for building the sample apps on Linux? Trying this (which seems obvious) fails:

make -f makefile.gcc
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

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4425
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compiling Samples

Post by ONEEYEMAN » Mon Mar 11, 2019 3:30 pm

@PB,
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
Then in order to build the samples you do:

Code: Select all

cd samples
make
If you are trying to cross-compile, please show how did you build the library.

Thank you.

weswitt
Earned a small fee
Earned a small fee
Posts: 22
Joined: Thu Dec 29, 2016 10:45 pm

Re: Compiling Samples

Post by weswitt » Mon Mar 11, 2019 3:32 pm

Thanks that was it. I have it building now.

Post Reply