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?
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
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 firstname.lastname@example.org.
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 ]