FLTK logo

STR #3369

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | SVN ⇄ GIT ]

STR #3369

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:WIN32
Summary:Mismatched case for filenames and in #include directives
Version:1.4.0
Created By:taeril
Assigned To:manolo
Fix Version:1.4-current (SVN: v12233)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 taeril
10:34 Mar 26, 2017
include.diff
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 taeril
10:34 Mar 26, 2017
I couldn't compile on Linux for Windows because in two files in #include directives case of filenames didn't match what I had on filesystem.

src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx line 36:
#include <FL/x.h>

src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx line 26:
#include <Commdlg.h>

Windows have case insensitive filesystems so there shouldn't matter proposed patch (read: I haven't compiled on Windows). Also some old mingw installation on Windows drive (not crosscompiler I used on Linux) also have commdlg.h with lower case c so it looks OK.


Another mismatched case I found is in src/Fl_Table.cxx on line 25 but that #include is wrapped in #if defined(USE_UTF8) [...] and quick grep found USE_UTF8 only in this place so it looks like dead code. As I was able to compile without bothering with this line I'm just reporting weird find.
 
 
#2 ianmacarthur
02:05 May 03, 2017
As I understand it, this patch is proposing to change the case of some filenames, specifically to:-

FL/x.h

and

Commdlg.h


However, I do not think that can be correct.

The "correct" case for the first would be "FL/x.H" on all platforms.

The second seems more problematic: I checked the win32api files that I have on several systems, and all of these had "commdlg.h", none had "Commdlg.h".

I also checked the MS files in a VS2010 installation; it has CommDlg.h and commdlg.inl. Go figure...

Yet the OP reports that the system he has uses Commdlg.h.

I think there is no easy answer here, but we need to work with the majority use case I guess...
 
 
#3 taeril
03:54 May 03, 2017
You misunderstood. It's other way.
FLTK source: Commdlg.h and FL/x.h
my filesystem: commdlg.h and FL/x.H

So mingw have commdlg.h and VS have CommDlg.h
VS is Windows only and there we have case insensitive filesystem so I still think that using commdlg.h is OK.
 
 
#4 AlbrechtS
04:29 May 03, 2017
Yes, I think Yakub (the OP) is right, and the patch ought to work. Ian, I'd appreciate if you could test and commit, since my spare time doesn't allow testing right now.

The other thing mentioned in "src/Fl_Table.cxx on line 25" is potentially dead code, so this might be removed or be fixed anyway. I'd like to have that checked, but again, no time right now. Sorry.
 
 
#5 AlbrechtS
04:36 May 03, 2017
One more note: since all Windows file systems I know of are case insensitive we shouldn't need to care about native compilation.

The OP's point was about cross compilation under Linux with typically case sensitive file systems. I wonder if all Windows headers in all cross compilation environments use the same casing, but we can at least make sure that one (the OP's) environment works well. If I had enough time I could also test cross compilation on one of my Linux systems...
 
 
#6 manolo
09:29 May 05, 2017
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.