Page 2 of 3

Re: "Setup.h" not found

Posted: Tue Dec 06, 2011 9:38 pm
by steve
Edgar wrote:Start VC++ to compile Audacity and open lib-srcFileDialogFileDialog.h; look at line 24:
#include "wx/defs.h"
right-click for the context menu and open defs.h; look at line 21:
#include "wx/platform.h"
right-click for the context menu and open platform.h; look at line 196:
#include "wx/setup.h"
right-click for the context menu to open it--did it open?
Each one opened up until #include "wx/setup.h" which did not open.
That's crap, there's a big long error message and I can't copy it.
The error begins:
File 'wx/setup.h' not found in current source file's directory or in build system paths.

Current source file path: 'C:wxWidgets-2.8.12includewx'
Build system path:
and then a semicolon separated list of about 50 directories.

Re: "Setup.h" not found

Posted: Tue Dec 06, 2011 11:27 pm
by steve
steve wrote:Each one opened up until #include "wx/setup.h" which did not open.
That's crap, there's a big long error message and I can't copy it.
The error begins:

File 'wx/setup.h' not found in current source file's directory or in build system paths.
So I copied setup.h to C:wxWidgets-2.8.12includewx
strange, I thought I'd already done that.

Getting further now but hitting Linking Errors.
Have followed various hints, posts and stuff and have cleaned the solution and building again - not a fast machine, this could take some time....

Re: "Setup.h" not found

Posted: Tue Dec 06, 2011 11:31 pm
by steve
Ran into the issue:
'msgfmt' is not recognized as an internal or external command,

Found this: http://forum.audacityteam.org/viewtopic ... 19&t=58198
Grabbed a copy of msgfmt.exe and put it in my Path.

That seems to have fixed that problem.

Also had to set up Python environment variable.

Re: "Setup.h" not found

Posted: Tue Dec 06, 2011 11:35 pm
by steve
How dare these Microsoft people ever criticise Linux. I've not encountered such buggy, convoluted, un-user friendly, badly documented bloatware in years.

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 12:06 am
by steve
I got this far this time.

Code: Select all

------ Skipped Build: Project: expat, Configuration: Unicode Release Win32 ------
Project not selected to build for this solution configuration 
------ Build started: Project: libid3tag, Configuration: Unicode Release Win32 ------
Compiling...
util.c
......lib-srclibid3tagutil.c(29) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectslibid3tagUnicode ReleaseBuildLog.htm"
libid3tag - 1 error(s), 0 warning(s)
------ Build started: Project: mod-script-pipe, Configuration: Unicode Release Win32 ------
Linking...
LINK : fatal error LNK1181: cannot open input file 'wxmsw28u_core.lib'
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectsmod-script-pipeUnicode ReleaseBuildLog.htm"
mod-script-pipe - 1 error(s), 0 warning(s)
------ Build started: Project: help, Configuration: Unicode Release Win32 ------
Performing Pre-Build Event...
0 File(s) copied
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectshelpUnicode ReleaseBuildLog.htm"
help - 0 error(s), 0 warning(s)
------ Build started: Project: Audacity, Configuration: Unicode Release Win32 ------
Linking...
LINK : fatal error LNK1181: cannot open input file 'wxbase28u.lib'
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectsAudacityUnicode ReleaseBuildLog.htm"
Audacity - 1 error(s), 0 warning(s)
========== Build: 1 succeeded, 3 failed, 20 up-to-date, 1 skipped ==========

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 1:29 am
by Edgar
steve wrote:How dare these Microsoft people ever criticise Linux. I've not encountered such buggy, convoluted, un-user friendly, badly documented bloatware in years.
+infinity

I come from a long history of non-MS platforms and being forced to go Windows was really painful.

I'm just about out the door to rehearsal and will revisit this thread later.

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 2:05 am
by Edgar
steve wrote:
steve wrote:Each one opened up until #include "wx/setup.h" which did not open.
That's crap, there's a big long error message and I can't copy it.
The error begins:

File 'wx/setup.h' not found in current source file's directory or in build system paths.
So I copied setup.h to C:wxWidgets-2.8.12includewx
strange, I thought I'd already done that.

Getting further now but hitting Linking Errors.
Have followed various hints, posts and stuff and have cleaned the solution and building again - not a fast machine, this could take some time....
steve wrote:
Edgar wrote:Start VC++ to compile Audacity and open lib-srcFileDialogFileDialog.h; look at line 24:
#include "wx/defs.h"
right-click for the context menu and open defs.h; look at line 21:
#include "wx/platform.h"
right-click for the context menu and open platform.h; look at line 196:
#include "wx/setup.h"
right-click for the context menu to open it--did it open?
Each one opened up until #include "wx/setup.h" which did not open.
That's crap, there's a big long error message and I can't copy it.
The error begins:
File 'wx/setup.h' not found in current source file's directory or in build system paths.

Current source file path: 'C:wxWidgets-2.8.12includewx'
Build system path:
and then a semicolon separated list of about 50 directories.

OK, you are suffering from the rare but deadly "not searching sub-directories" bug. First, according to the wxWidgets folks ( http://wiki.wxwidgets.org/Microsoft_Vis ... p_settings ) on where setup.h is supposed to be:
"The settings that could be of interest are stored as defines in the file setup.h, located in "includewxmsw".
It should not be in WXWINincludewx. There is some hidden MS system setting which tells VC++ to search sub-folders for header files; if you first install the demo trial of MS Visual Studio then VC++ this switch is turned on and left on when you un-install MS VS before the trial runs out.

In your case you are going to need to go in and teach each offending solution about the sub-folders it needs to search. I am out the door now and will come back in a few hours to finish with the answer.

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 2:06 am
by Edgar
steve wrote:I got this far this time.

Code: Select all

Compiling...
util.c
......lib-srclibid3tagutil.c(29) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectslibid3tagUnicode ReleaseBuildLog.htm"
libid3tag - 1 error(s), 0 warning(s)
This is related to the "not searching sub-folders" bug--more later...

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 6:52 am
by Edgar
Without trying (too hard) to assign blame, here is what I think is going on...
wxWidgets expects to find a file "setup.h" during compile of wxWidgets. This file is not "supplied" by wxWidgets but must be created by the person doing the compiling. wxWidgets provides an example file for those using a Microsoft Visual compiler (VC++ Express is the free version, Visual Studio you pay for)--it is called "setup0.h". The person must edit "setup0.h" as needed then rename it "setup.h" and put it somewhere all the various projects may find it. wxWidgets says to put it in WXWIN/include/wx/msw/; unfortunately they also use statements like:
#include "wx/setup.h"
or
#include <wx/setup.h>
which while subtly different should result in the same thing. I believe that the instruction to put "setup.h" in WXWIN/include/wx/msw/ is in err--while it really is the proper place for the header for MS VS/VC++ Express, it has a high likelihood of not being found because of the aforementioned "not searching sub-folders" MS bug (which is really a clever marketing tool as it is not a problem in the pay-for version nor its free trial)*. Anyway, since they use
#include "wx/setup.h"
or
#include <wx/setup.h>
they might just tell us to put it in WXWIN/include/wx/ and resolve the issue.

I do not know what the "proper" solution here is but if you want to keep "setup.h" in WXWIN/include/wx/msw/ where it more properly belongs you will need to go in and teach all the projects which deal with "setup.h" where it can be found. I just checked out a clean SVN HEAD and opened the Properties page of the Audacity Project; looking at the C/C++'s General panel's Additional Include Directories:
addInc.png
addInc.png (168.15 KiB) Viewed 6623 times
you will see that $WXWINinclude is there but $WXWINincludemsw is not--you will need to add it. Scroll all the way to the bottom of the includes and you will find a blank line--double-click to make that line editable and add $WXWINincludemsw:
addIncWX.png
addIncWX.png (13.05 KiB) Viewed 6623 times
You will need to do this for every project in the Audacity solution (maybe even some of the wxWidgets ones) which uses "setup.h" (and maybe "platform.h" too among others).

Now, some might say that the Audacity Developers instructions which says "Copy setup.h to "C:wxWidgets-2.8.12includewxmsw" (referring to an Audacity custom "setup.h") needs thought since they are the ones who created the Audacity solution which neglects to have $WXWINincludemsw as an include folder. I will go out on a limb here and call this a high priority bug against Audacity--especially since it is so easy to fix at the project source level.

* The MS "bug" (or marketing tool) is that the documentation for MS's C++ compiler states that all sub-directories of any "included" directory will be automatically included and, in the case of the pay-for version Visual Studio, this is true. It is also true for the free trial version of MS Visual Studio. It also seems to hold true for VC++ Express (the free version) if you install MS VS (or its free trial) then later install Express! I am guessing it is a Registry setting controlling it or some .ini file.

Re: "Setup.h" not found

Posted: Wed Dec 07, 2011 7:09 am
by Edgar
steve wrote:I got this far this time.

Code: Select all

------ Build started: Project: libid3tag, Configuration: Unicode Release Win32 ------
Compiling...
util.c
......lib-srclibid3tagutil.c(29) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
Build log was saved at "file://c:Documents and SettingsSteveMy DocumentsaudacitywinProjectslibid3tagUnicode ReleaseBuildLog.htm"
libid3tag - 1 error(s), 0 warning(s)
lib-srclibid3tagutil.c line 29:
# include <zlib.h>

IMVHO, this is a "defect" in code; "zlib.h" is a wxWidgets file:
wxWidgets-2.8.12srczlibzlib.h
so the Audacity code should read something like:
#include <WXWIN/src/zlib/zlib.h>
but that is not legal so again we must teach the libid3tag project an Additional Include Directory (see previous post for steps) which will be:
$WXWIN/src/zlib

As before, this will "just work" if you are using or have used the pay-for version of MS VS.