Opened 20 months ago

Closed 9 months ago

#14575 closed build error (fixed)

wxMSW-2.9.4-Setup.exe doesn't install setup.h

Reported by: Remdul Owned by:
Priority: normal Milestone: 2.9.5
Component: wxMSW Version: 2.9.4
Keywords: mswud mswd Cc: biol75@…
Blocked By: Blocking:
Patch: no

Description

After upgrading to 2.9.4 and rebuilding my project, it fails to compile.
MSVC9 (2008 Express) on WinXP SP2. The error:

D:\SDK\wxWidgets-2.9.4\include\msvc\wx/setup.h(105) : fatal error C1083: Cannot open include file: '../../../lib/vc_lib/mswd/wx/setup.h': No such file or directory

The folder "lib/vc_lib/mswd" does not exist.
The folder "lib/vc_lib/mswud" does exist, however.

By renaming this folder from "mswud" to "mswd", my project compiles, but now fails at link time:

LINK : fatal error LNK1104: cannot open file 'wxbase29d.lib'

Similarly, the linker presumes a file named "wxbase29d.lib", instead of the file that does exist, "wxbase29ud.lib". Once again, renaming all .lib files solves the link problem. But of course this should be fixed in the wx project solution.

I also had trouble compiling wxWidgets 2.9.4 from the Windows installer (wxMSW-2.9.4-Setup.exe). The setup0.h was not present as setup.h . This problem was not present with the .tar.bz2 version (compiled without warning out of the box). I did not try the .zip .

Attachments (1)

build_chm_exe.bat download (1.6 KB) - added by doscott 19 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 20 months ago by Remdul

I forgot to add: I tried building wxWidgets 2.9.4 from all MSVC workspaces included (upgraded where needed); they all produced the same folder/filenames, thus all have this problem.

comment:2 Changed 20 months ago by vadz

  • Resolution set to invalid
  • Status changed from new to closed

You don't say how do you build (or even what do you build, actually) but the file "vc_lib/msw/wx/setup.h" would be only created by wxWidgets build if you build it in non-Unicode. The default is Unicode and the corresponding path is "mswud".

You probably need to update your project configuration to use Unicode build of wxWidgets (or, alternatively, rebuild wxWidgets without Unicode but this is strongly not recommended) but this doesn't seem to have anything to do with building wxWidgets itself.

If you still think there is a problem with wx, please explain what exactly are you doing, i.e. using project files or makefiles, and what error exactly do you get.

comment:3 Changed 20 months ago by Remdul

Ok, I feel like an idiot. Although I had configured my project as per "install.txt", changing (or leaving) the Unicode project setting in MSVC9 to "Not Set", under specific conditions, removes the _UNICODE pre-processor definition. It seems this only happens when _UNICODE is the only pre-processor definition. By adding some extra dummy definition on a new line it is no longer removed (regardless of Unicode setting changes). This may also explain why I didn't run into these compile errors before with older wxWidgets versions, as it was erroneously #including and linking to the right files all along.

comment:4 Changed 19 months ago by jonmarbach

The part of this ticket that is valid is this:

"I also had trouble compiling wxWidgets 2.9.4 from the Windows installer (wxMSW-2.9.4-Setup.exe). The setup0.h was not present as setup.h"

I can confirm that the executable (wxMSW-2.9.4-Setup.exe) installs only setup0.h not setup.h. I can also confirm that the .zip file contains the correct setup.h file in the include/wx/msw folder.

I don't feel like I know enough about the distribution build process to warrant re-opening this or not (i.e., was this a one-off bundling problem?), so I'm leaving it as closed.

comment:5 Changed 19 months ago by vadz

  • Cc biol75@… added
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Summary changed from projects using wxWidgets 2.9.4 fail to compile/link out-of-the-box to wxMSW-2.9.4-Setup.exe doesn't install setup.h

Chris, could you please check this? I don't really see why would this happen if setup.h is present in the tree from which setup is built but I could be missing something here...

comment:6 Changed 19 months ago by biol75

  • Status changed from reopened to confirmed

There really is no setup.h

As I didn't build this exe, I'm not sure what happened.

The problem lies on line 47 of build\tools\bld_chm_exe.bat
I guess the copy command put setup.h on the wrong disk, but can't be sure

chris

Changed 19 months ago by doscott

comment:7 follow-up: Changed 19 months ago by doscott

I built the exe. It's the first time (maybe the last :( ). I don't know what happened.

I just built it again and installed the result, and setup.h is there.

I attached the bat file I used. It is a slightly modified version of the official one so I could run it in my configuration. If you get a chance and if you think I might be allowed to build the exe again in the future, please review it to see if there is anything obvious.

comment:8 in reply to: ↑ 7 Changed 19 months ago by vadz

Replying to doscott:

I built the exe. It's the first time (maybe the last :( ).

Let me tell you that if everybody stopped working on wxWidgets after making the first mistake, it wouldn't have gone far, so please don't worry about this. The important thing is to ensure that the same problem doesn't happen again.

I just built it again and installed the result, and setup.h is there.

I guess we should just recheck that it's there in 2.9.5.

I attached the bat file I used. It is a slightly modified version of the official one so I could run it in my configuration. If you get a chance and if you think I might be allowed to build the exe again in the future, please review

it to see if there is anything obvious.

OK, will do, thanks.

comment:9 Changed 19 months ago by biol75

Could you out a diff of your bat file here, please and if it is an improvement, it can be comitted to the trunk for 2.9.5

chris

comment:10 Changed 19 months ago by doscott

I could, but I don't think it would be of much use. The bat file used right now is for a production environment, set up path information, etc. I just edited it for my build environment, nothing important was changed (I hope). If someone can check for anything obvious being wrong, and nothing is found, I can certainly submit it as a patch.

comment:11 Changed 9 months ago by vadz

  • Resolution set to fixed
  • Status changed from confirmed to closed

The .exe for 2.9.5 was verified to contain the file so this seems to be fixed.

Note: See TracTickets for help on using tickets.