Project

General

Profile

Bug #1159

fff.h:33:2: error: 'BYTE' does not name a type

Added by Jakub Wilk almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
Start date:
29 Jan 2016
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

When trying to look into #1102, I run into yet another build failure:

In file included from jpgimage.cpp:49:0:
fff.h:33:2: error: 'BYTE' does not name a type
  BYTE          major;
  ^

MSDN says that BYTE and friends are defined in windef.h, so let's include it.


Files

jpgimage-windef.diff (266 Bytes) jpgimage-windef.diff Jakub Wilk, 29 Jan 2016 18:00

Related issues

Related to Exiv2 - Bug #1102: install: cannot stat '../bin/.libs/exiv2.exe': No such file or directoryClosed09 Aug 2015

Actions

Associated revisions

Revision 4197 (diff)
Added by Robin Mills almost 6 years ago

#1159. Thank You, Jakub for discovering this issue and for providing a patch.

Revision 4198 (diff)
Added by Robin Mills almost 6 years ago

#1159. Fixing MSVC build-breaker in r4197 and r4179.
Two different issues:
r4197 include <windef.h> does not compile with MSVC 2005 and changed to <windows.h>
r4179 has a short/long compare mismatch
MSVC is a severe build environment and treats warnings as errors. MSVC is not fragile, it's robust.

History

#1

Updated by Robin Mills almost 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Target version set to 0.26
  • % Done changed from 0 to 20
  • Estimated time set to 2.00 h

Are you cross compiling?

It compiles with MSVC (2003..2015) and GCC (Cygwin and MinGW). If you add #include <windef.h>, do it build for you? If this is working on your platform, I'll submit the change and the buildserver will build it with MSVC, Cygwin and MinGW.

#2

Updated by Jakub Wilk almost 6 years ago

Yes, I'm cross-compiling (./configure --host=i686-w64-mingw32).
Yes, adding the include fixed the build failure for me.
I don't understand why it built successfully when building natively. :-O

#3

Updated by Robin Mills almost 6 years ago

Thanks, Jakub. I've submitted your patch. I'll check the buildserver later to be sure it has build and passed the test suite on our supported platforms.

I can't really offer any thoughts about why it doesn't cross compile as I've never succeeded in cross-compiling (with or without this issue). I think the "Native" platforms (not cross compiling) include <windows.h> which ultimately includes "windef.h". However let's not discuss how things don't work. Let's be happy that you've found and fixed this.

#4

Updated by Robin Mills almost 6 years ago

  • % Done changed from 20 to 100

Fix submitted. r4198. Please see svn log and #1102 for additional comments.

#5

Updated by Robin Mills over 5 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF