Bug #1159

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

Added by Jakub Wilk almost 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:29 Jan 2016
Priority:NormalDue date:
Assignee:Robin Mills% Done:


Category:buildEstimated time:2.00 hours
Target version:0.26


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.

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

Related issues

Related to Exiv2 - Bug #1102: install: cannot stat '../bin/.libs/exiv2.exe': No such fi... Closed 09 Aug 2015

Associated revisions

Revision 4197
Added by Robin Mills almost 2 years ago

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

Revision 4198
Added by Robin Mills almost 2 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.


#1 Updated by Robin Mills almost 2 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

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 2 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 2 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 2 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 1 year ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux