Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expected a file name error #842

Closed
naveenpinto opened this issue Aug 24, 2018 · 8 comments
Closed

expected a file name error #842

naveenpinto opened this issue Aug 24, 2018 · 8 comments

Comments

@naveenpinto
Copy link

i am getting this error in core.h. does anyone have a solution for this issue, it is on visual studio C++ 2015.

image

Severity Code Description Project File Line
Error (active) expected a file name GExport c:\Users\JNP014\Documents\Visual Studio 2015\Projects\staticlogger\staticlogger\spdlog\fmt\bundled\core.h 183

It points to this code

// libc++ supports string_view in pre-c++17.
#if (FMT_HAS_INCLUDE(<string_view>) && (__cplusplus > 201402L || defined(_LIBCPP_VERSION))) ||
(defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
#include <string_view>
#define FMT_USE_STD_STRING_VIEW
#elif (FMT_HAS_INCLUDE(<experimental / string_view>) && __cplusplus >= 201402L)
#include <experimental/string_view>
#define FMT_USE_EXPERIMENTAL_STRING_VIEW
#endif

has anyone encountered this????

image

@naveenpinto
Copy link
Author

any solution for this bug would be appreciated!!!!!

@vitaut
Copy link
Contributor

vitaut commented Aug 28, 2018

This is strange. MSVC 2015 doesn't have __has_include (https://godbolt.org/z/070ovR), so FMT_HAS_INCLUDE should just expand to 0. Could you try compiling

#if defined(__has_include)
# error __has_include
#else
# error no __has_include
#endif

and posting the output here?

@mwinterb
Copy link
Contributor

Does the error occur at compile time, or just in the IDE? The Intellisense frontend is uses EDG which may have limited __has_include support partly enabled even in VS2015.

@naveenpinto
Copy link
Author

@vitaut below is the output of the code you have supplied

image

@naveenpinto
Copy link
Author

@vitaut below is the compilation error

image

@naveenpinto
Copy link
Author

naveenpinto commented Aug 29, 2018

This error pops up when there are existing errors in the code, if we clear the existing errors this error "expected a file name" goes off.

hear i have purposely added cout which give an error and the "expected a file" name error pops up

image

@vitaut
Copy link
Contributor

vitaut commented Aug 30, 2018

This is a bug in IntelliSense which you can safely ignore or report to Microsoft that will ignore it for you. I've implemented a tentative workaround in 38ee424, but haven't tested as I don't have a Windows machine at hand.

@vitaut vitaut closed this as completed Aug 30, 2018
@naveenpinto
Copy link
Author

@vitaut thanks a lot for the inputs!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants