Your compiler’s command line contains -I -c
sequence.
This -I
option “swallows” your -c
option. -I
requires an additional argument, which is an include directory name. You failed to supply that argument, which is why -I
assumes that -c
that follows it is the directory name. So that -I
consumes that -c
.
The compiler never sees that -c
. Without -c
it assumes that you want to compile and link your program. Since Gladius.cpp
does not have main
in it, you get the error at linking stage.
Here ‘s a simple demo of the same problem: http://coliru.stacked-crooked.com/a/8a37cd3e90a443e2
You need to figure out why you have an orphaned -I
in your command line.
Related Posts:
- Sleep for milliseconds
- Sleep for milliseconds
- undefined reference to WinMain@16 (codeblocks)
- error: lvalue required as unary & operand
- How to print pthread_t
- error: lvalue required as unary & operand
- Using O_RDWR vs O_RDONLY | O_WRONLY
- C++ Fatal Error LNK1120: 1 unresolved externals
- Cannot open output file, permission denied
- expected identifier before string constant
- Implementing a tree in C++
- G++ undefined reference to class::function
- Error : aggregate ‘first one’ has incomplete type and cannot be defined
- C++ error: undefined reference to ‘clock_gettime’ and ‘clock_settime’
- C++ : Exception occurred in script: basic_string::_S_construct NULL not valid
- template argument 1 is invalid (Code::Blocks Win Vista) – i don’t use templates
- Floating point exception( core dump
- Passing Arrays to Function in C++
- Return array in a function
- Regular cast vs. static_cast vs. dynamic_cast
- What is an unsigned char?
- C++ std::priority_queue uses the lambda expression
- When to use reinterpret_cast?
- Expression must be a modifiable lvalue
- How to read a file line by line or a whole text file at once?
- How does the modulus operator work?
- Single class has a Class Redefinition Error
- Identifier not found error on function call
- Debug assertion failed. C++ vector subscript out of range
- What causes a SIGABRT fault?
- Graphics Library for C++
- ‘cout’ was not declared in this scope
- What is the difference between const int*, const int * const, and int const *?
- TranslateName() function doesn’t work on win10
- How to use the PI constant in C++
- How to concatenate two strings in C++?
- C++ error: “Array must be initialized with a brace enclosed initializer”
- Why am I getting string does not name a type Error?
- How to avoid the error: terminate called after throwing an instance of ‘std::logic_error’ what(): basic_string::_S_construct null not valid
- Error while overloading operator (must be a nonstatic member function)
- Vector of structs initialization
- C++ deprecated conversion from string constant to ‘char*’
- Converting a vector
to string - std::string formatting like sprintf
- Sorting Characters Of A C++ String
- How to convert vector to array
- “non-standard syntax; use ‘&’ to create a pointer to member” error in Visual Studio 2015
- libpng warning: iCCP: known incorrect sRGB profile
- C++: Expression must have a constant value when declaring array inside function
- What does ‘const static’ mean in C and C++?
- C++ wait for user input
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- How to run valgrind with basic c example?
- initial value of reference to non-const must be an lvalue
- Typedef function pointer?
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- cannot declare variable ‘’ to be of abstract type ‘’
- Difference between ‘struct’ and ‘typedef struct’ in C++?
- Debug vs Release in CMake
- C++ Matrix Class
- access violation reading location c++
- C++ template constructor
- PlaySound in C++ Console application?
- How to call on a function found on another file?
- How to project a point onto a plane in 3D?
- Using C-string gives Warning: “Address of stack memory associated with local variable returned”
- generate random double numbers in c++
- Cygwin Make bash command not found
- C++ Compiler Error C2280 “attempting to reference a deleted function” in Visual Studio 2013 and 2015
- Why use pointers?
- Why I cannot cout a string?
- How do I return a char array from a function?
- c++ reading csv file
- Why do you use typedef when declaring an enum in C++?
- How to change string into QString?
- Including .cpp files
- Class template inheritance C++
- Converting String to Cstring in C++
- creating dynamic array of string c++
- How well is Unicode supported in C++11?
- The CXX compiler identification is unknown
- Two decimal places using printf( )
- error C2244 unable to match function definition to an existing declaration
- Initializing pointers in C++
- Static vs dynamic type checking in C++
- “No rule to make target ‘install'”… But Makefile exists
- How to determine the version of the C++ standard used by the compiler?
- Make / gcc cryptic error 2: how to have more information?
- REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found
- Error: expression cannot be used as a function?
- What is a .h.gch file?
- MinGW .exe requires a few gcc dll’s regardless of the code?
- What does “warning: not all control paths return a value” mean? (C++)
- Array of Linked Lists C++
- Is it still safe to delete nullptr in c++0x?
- Declaration is incompatible with type
- One or more multiply defined symbols found
- I’m getting the error “stoi is not a member of std” in myprogramminglab [duplicate]
- Template constructor in a class template – how to explicitly specify template argument for the 2nd parameter?
- C++ float array initialization