Closed SeveriSuominen closed 2 years ago
Definitely looks like ncurses is not linking properly, but not sure I can help without knowing the build process that you use.
Since you are already using CMake, I recommend adding ImTui as a git submodule to your project and adjusting you CMakeLists.txt to link the imtui
target. The hnterm project demonstrates how to do it.
@ggerganov thank you for reply. I just got it working. I am just not sure how. So basically only change I made was I moved all the ncurses 'target_link_libraries' calls after ImTui 'target_link_libraries' calls in my CMakeLists.txt, so:
Not working order:
# ncurse before
target_link_libraries(NL_Client libform.a)
target_link_libraries(NL_Client libmenu.a)
target_link_libraries(NL_Client libncurses.a)
target_link_libraries(NL_Client libpanel.a)
# ImTui after
target_link_libraries(NL_Client libimtui-ncurses.a)
target_link_libraries(NL_Client libimtui.a)
And working order:
#ImTui before
target_link_libraries(NL_Client libimtui-ncurses.a)
target_link_libraries(NL_Client libimtui.a)
# ncurse after
target_link_libraries(NL_Client libform.a)
target_link_libraries(NL_Client libmenu.a)
target_link_libraries(NL_Client libncurses.a)
target_link_libraries(NL_Client libpanel.a)
not really sure what happens here.
Yeah, sometimes the link order matters - https://stackoverflow.com/questions/11893996/why-does-the-order-of-l-option-in-gcc-matter
Hello,
I am currently trying to include ImTui to my current console project. I followed instructions and it seems there is some linking problems (probably trivial, I am not too familiar with c/c++ world). I am using CMake and linked all ImTui .a files, I also have ncurses linked to my project. Result when I try to build and run my project:
so all the link problems seems to be with ncurses. Do you know what I am doing wrong here?
Best regards.