This is wrong:
g++ -c src/CNumber.cpp src/CNumber.h -o src/CNumber.o
You shouldn’t “compile” .h files. Doing so will create precompiled header files, which are not used to create an executable. The above should simply be
g++ -c src/CNumber.cpp -o src/CNumber.o
Similar for compiling the other .cpp files
Related Posts:
- gcc makefile error: “No rule to make target …”
- gcc makefile error: “No rule to make target …”
- How does #include
work in C++? - What is the difference between gcc/g++ and cc1/cc1plus?
- File format not recognized; treating as linker script using GCC
- What is the difference between g++ and gcc?
- Undefined reference to vtable
- How do I install gcc on cygwin?
- what is stack smashing (C)?
- Undefined reference to vtable
- libpthread.so.0: error adding symbols: DSO missing from command line
- fatal error: Python.h: No such file or directory
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- How do I force make/GCC to show me the commands?
- Compiling a C++ program with gcc
- Visual C++ find line causing “Debug Assertion failed”
- gcc/g++: “No such file or directory”
- error: use of deleted function
- (.text+0x20): undefined reference to `main’ and undefined reference to function
- Interpreting valgrind error Invalid write of size 4
- ‘strcmp’ was not declared in this scope
- Compiling a .C file: Undefined symbols for architecture x86_64
- gcc error : undefined reference to `itoa’
- How to repair warning: missing braces around initializer?
- Update GCC on OSX
- gcc error: wrong ELF class: ELFCLASS64
- How do I compile the asm generated by GCC?
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- C Unknown type name ‘my_structure’
- Make Error 127 when running trying to compile code
- Gcc error: gcc: error trying to exec ‘cc1’: execvp: No such file or directory
- gcc 4.8 on MAC OS X 10.8 throws “Undefined symbols for architecture x86_64: “
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Make / gcc cryptic error 2: how to have more information?
- Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file
- What is the difference between gmake and make?
- I don’t understand -Wl,-rpath -Wl,
- Compiler gcc:error; no such file or directory
- Differences between arm64 and aarch64
- g++ ld: symbol(s) not found for architecture x86_64
- makefile:4: *** missing separator. Stop
- Error in make command makefile:18: *** missing separator. Stop [duplicate]
- C++ undefined reference to defined function
- What is a build tool?
- Convert char to int in C and C++
- what is the difference between ‘make after make clean’ and just ‘make’?
- How to make a SIMPLE C++ Makefile
- Virustotal Trapmine suspicious.low.ml.score
- What are the differences between make clean, make clobber, make distclean, make mrproper and make realclean?
- Error – Android resource linking failed (AAPT2 27.0.3 Daemon #0)
- make *** no targets specified and no makefile found. stop
- Error – Android resource linking failed (AAPT2 27.0.3 Daemon #0)
- How is “mvn clean install” different from “mvn install”?
- Expected initializer before function name
- Inheriting constructors
- How to install and use “make” in Windows?
- make: g++: Command not found
- C ++ error: a expected initializer before [function name]
- Inheriting constructors
- How to install “make” in ubuntu?
- Compiling C++11 with g++
- Still getting warning : Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’
- gcc: error: unrecognized command line option
- “g++” is not recognized as an internal or external command, MinGW
- setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
- warning: incompatible implicit declaration of built-in function ‘xyz’
- Difference between using Makefile and CMake to compile the code
- How to use LDFLAGS in makefile
- How to print out a variable in makefile
- undefined reference to ‘std::cout’
- Eclipse C++ : “Program “g++” not found in PATH”
- how to “execute” make file
- How to run a makefile in Windows?
- MinGW: “gcc is not recognized as an internal or external command”
- How does “make” app know default target to build if no target is specified?
- Gradle does not find tools.jar
- “g++” is not recognized as an internal or external command, MinGW
- conflicting types error when compiling c program using gcc
- What is a file with extension .a?
- Undefined reference to class constructor, including .cpp file fixes
- Cygwin – Makefile-error: recipe for target `main.o’ failed
- Making a Java Makefile
- node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected error after installation of Angular 6
- Makefile:2: *** missing separator. Stop
- Eclipse C++ : “Program “g++” not found in PATH”
- What is the “Illegal Instruction: 4” error and why does “-mmacosx-version-min=10.x” fix it?
- How do I enable C++11 in gcc?
- error: This is probably not a problem with npm. There is likely additional logging output above
- Undefined reference to constructor
- Installing GCC on macOS Catalina
- Make error: missing separator
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- expected unqualified-id before string constant
- Visual Studio: The Operation could not be completed. The parameter is incorrect
- make: Nothing to be done for `all’
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- cannot declare variable ‘’ to be of abstract type ‘’
- difference between
and - What are Makefile.am and Makefile.in?
- extra qualification error in C++