PNG files resources compiling on MacOS X with g++

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
tejinaji
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Jun 17, 2023 1:45 am

PNG files resources compiling on MacOS X with g++

Post by tejinaji »

Hello, Can anyone get an advice how would I compile my resources to executable?
I have some PNG files to be drawn on my executable in windows I do use windres to compile to .o object file and then compiling it all together to .exe file.
And then I use wxBitmap("bitmap_name", wxBITMAP_TYPE_PNG_RESOURCE) in my code.
Is there any similar method in Mac?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7060
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: PNG files resources compiling on MacOS X with g++

Post by ONEEYEMAN »

Hi,
On Mac you don't compile them. You copy them into thr special folder in the Application Bundle.

Look at the sample (minimal or drawing).
Build them and run them.
See how they manage external resources.

Thank you.
tejinaji
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Jun 17, 2023 1:45 am

Re: PNG files resources compiling on MacOS X with g++

Post by tejinaji »

ONEEYEMAN wrote: Mon Sep 18, 2023 11:37 am Hi,
On Mac you don't compile them. You copy them into thr special folder in the Application Bundle.

Look at the sample (minimal or drawing).
Build them and run them.
See how they manage external resources.

Thank you.
Thank you for reply <3
As I can see it's just loading it as external file, what a valid path is it's the Bundle folder?

Code: Select all

gs_bmp4->LoadFile(path, wxBITMAP_TYPE_BMP);
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7060
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: PNG files resources compiling on MacOS X with g++

Post by ONEEYEMAN »

Hi,
Build the drawing sample and see where it's pictures will go.

Thank you.
Post Reply