Wrong setup.h file?

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
Neal_Miskin
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Jan 12, 2019 10:00 pm

Wrong setup.h file?

Post by Neal_Miskin »

So I'm a n00b trying to get wxWidgets to work with Code::Blocks on OS X (10.13.2)

At first I was getting a missing wx/app.h error.
So I added the include directory in the compiler settings, then it went on to missing setup.h

There are several versions of setup.h I tried pointing the compiler to a few of them, one at a time, starting with the "master copy" as mentioned in another post on this forum, then I tried the ones from the various osx directories. So far if it finds a setup.h file at all, it proceeds to throw a whole bunch of compiler errors, so I guess I must be pointing it to the wrong version of the file?

I'm not experienced enough to know what all these errors actually mean other than that something is wrong. I have included the errors that Code::Blocks is giving me in the attached text file.

P.S. I'm only trying to compile the default Hello World program, I haven't touched any code yet.
Attachments
CodeBlocks_error.txt
(3.95 KiB) Downloaded 76 times
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wrong setup.h file?

Post by stahta01 »

Did you try using wx-config as suggested?

Can you try using "wx-config --list" on the command and post the results. Do not enter the quotes in the command line.

Tim S.
Neal_Miskin
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Jan 12, 2019 10:00 pm

Re: Wrong setup.h file?

Post by Neal_Miskin »

"-bash: wx-config: command not found"

There is a wx-config.in file and a wx-config-inplace.in and an alias in the build-cocoa-debug folder called wx-config but whatever file it is pointing to doesn't seem to be an executable.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wrong setup.h file?

Post by doublemax »

How did you build wxWidgets itself? Before you continue with CodeBlocks, try to build wxWidgets and the "minimal" sample from the command line.
Use the source, Luke!
Neal_Miskin
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Jan 12, 2019 10:00 pm

Re: Wrong setup.h file?

Post by Neal_Miskin »

I followed the instructions in the readme file to build it.

mkdir build-cocoa-debug
cd build-cocoa-debug
../configure --enable-debug
make

the "minimal" sample seems to have compiled but is just a blank window with no controls.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wrong setup.h file?

Post by doublemax »

the "minimal" sample seems to have compiled but is just a blank window with no controls.
That sounds right. If you want you can try to build one of the more complex samples, e.g. "widgets" to be sure.

When you created a new project, did you select "wxWidgets project"? From there it's all about matching the project settings to the parameters you used when building wxWidgets.

Maybe this helps:
viewtopic.php?p=169501&sid=8b310aedd398 ... 93#p169501
(Ignore the command line for building as that's for Windows).
Use the source, Luke!
Neal_Miskin
In need of some credit
In need of some credit
Posts: 9
Joined: Sat Jan 12, 2019 10:00 pm

Re: Wrong setup.h file?

Post by Neal_Miskin »

Yeah the widgets app seems to work fine.

Code::Blocks still doesn't seem happy.

Should I try building wx again with different parameters? What parameters should I use?
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wrong setup.h file?

Post by doublemax »

Should I try building wx again with different parameters? What parameters should I use?
No. If building from the command line works fine, it's only a matter of configuring the CodeBlocks project correctly.

Unfortunately i can't help with that as i don't use CB.
Use the source, Luke!
Post Reply