Unable to compile program
Thavarshan opened this issue · comments
Divided up the program in to seperate files, main.cpp
, 'menu.cpp' and menu.h
; When compiling linker complaints about "symbol(s) not found".
menu.cpp
- Contains declaration of thedisplayMenu
function.menu.h
- Contains only declaration and not the body ofdisplayMenu
function.main.cpp
- UsesdisplayMenu
function inside themain
funciton.
The issue is you're not compiling the menu.cpp, though you have included "menu.h" in your code. First you need to compile menu.cpp with additional flag -c and with output as menu.o also do the same for main.cpp as well at last,
clang++ main.o menu.o -o app
Also, better we have a makefile created. I think you don't need to do these if you're directly compiling with Viscose c++ toolchain ryt?
It worked!