Re: [fltk.general] FLTK on Visual Studio 2019 x64, "Cannot open include file: 'dirent.h': No such file or directory

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: FLTK on Visual Studio 2019 x64, "Cannot open include file: 'dirent.h': No such file or directory Albrecht Schlosser 06:48 May 06 top right image
 
On 5/6/21 1:53 PM Tom Hogenkamp wrote:
I am using the FLTK library in Visual Studio Community 2019 and building my application for x86 works fine. Now, I would like to build it for x64. However, I am getting the error "Cannot open include file: 'dirent.h': No such file or directory.".

The error occurs in the file, named 'filename.H'. This header file comes with the FLTK library.

Has anyone an idea how I could fix this problem?

This error should not happen, all recent FLTK versions are known to build fine with VS Community 2019.

We need more info about the exact version of FLTK you downloaded, is it one of the 1.3 releases (latest is 1.3.6rc2), a FLTK 1.4 snapshot, or one of the Git branches (master = 1.4 or branch-1.3).

If you're using 1.3, did you use the bundled IDE files, or did you use CMake to generate FLTK.sln?

Please describe exactly what led to the error and post a little more context (at least the full error message). To post here, please use copy and paste, don't "describe" the error. Line numbers are important to (maybe) see what's going wrong.

After a little research I found that VS Studio should NOT include dirent.h at all. Your error seems to indicate that you are using 1.3. Again, the questions above need to be answered, and then:

Dohh, after rereading your message I see "building my application for x86 works fine", emphasis on "my application". If that's the case then it's very likely that you only need to define the preprocessor macro "WIN32" for your build to succeed.

What's the difference between your x86 build, how did you manage to switch from x86 to x64?

*Update:*

The dirent.h library is not recognized, because its an C POSIX library, as described in the link here below. However, the question still remains, namely, how can I fix this problem?

<dirent.h> in visual studio 2010 or 2008 <https://stackoverflow.com/questions/5530933/dirent-h-in-visual-studio-2010-or-2008>

That's a very old link and it doesn't apply because dirent.h should not be included in the first place, and the correct fix is to define WIN32 so it is not included by the given FLTK header.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/da47411b-8da2-e208-7e01-172ea99b0220%40online.de.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

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