#Other libraries seem to have issues with some header names

27 messages · Page 1 of 1 (latest)

west grotto
#

One example I've run into is trying to name my file "font.hpp", all of sudden 'imgui.h' can't be found, if I rename it to something else, all the problems go away?

What's happening and how can I resolve this?

balmy auroraBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

stable elk
west grotto
#

changing the file name to font_.hpp:

#

i can't really narrow down any context to this other than the file name

#

i've had this a few times with trying to name a header vertex.hpp and having issues with the glm library

#

it makes me think it's some kind of file naming conflict, but i don't understand how it can happen

stable elk
#

where is imgui.h located?

west grotto
stable elk
#

and where is your font_.hpp file located?

west grotto
#

C:\Users\ic2000\Documents\Projects\Development\archa\inc\font.hpp

stable elk
#

And did you properly set the include directories for your vs code folder settings?

west grotto
#

i don't set that up manually, i'm using cmaketools

#

the issue is though

#

oh yeah that does compile fine

#

wonder why clangd is struggling, it's usually quite accurate

stable elk
#

who knows

west grotto
#

ah

#

maybe it's my compile_commands.json, but even then removing it leaves the message

fathom zealot
west grotto
#

so it looks like clangd is finding my compile_commands.json bc after deleting it, all the intellisense breaks in terms of finding libraries

#

i'm wondering if this might be related

#

e.g. there's an sfml font.cpp in the compile_commands.json, maybe it's assuming my header is for that

#

ok that seems to have fixed it,

add_custom_target(
  generate_compile_commands ALL
  COMMAND
    compdb -p "${CMAKE_BINARY_DIR}" list > "${CMAKE_SOURCE_DIR}/compile_commands.json")

just added this to my cmakelists

west grotto
#

!solved