You should provide output file name after -o
option. In your case runexp.o
is treated as output file name, not input object file and thus your main
function is undefined.
Related Posts:
- “Multiple definition of” C++ compiler error
- C: linker command failed with exit code 1
- Why am I getting “undefined reference to sqrt” error even though I inclu de math.h header?
- Why does fatal error “LNK1104: cannot open file ‘C:\Program.obj'” occur when I compile a C++ project in Visual Studio?
- Why am I getting “undefined reference to sqrt” error even though I include math.h header?
- Why am I getting “undefined reference to sqrt” error even though I include math.h header?
- Multiple definition of … linker error
- C compile : collect2: error: ld returned 1 exit status
- gcc: undefined reference to
- Telling gcc directly to link a library statically
- warning: implicit declaration of function
- What is the difference between float and double?
- What is the difference between ++i and i++?
- Stack smashing detected
- Why am I getting “void value not ignored as it ought to be”?
- Pointer Arithmetic
- Openssl : error “self signed certificate in certificate chain”
- What does \0 stand for?
- Expression must be a modifiable L-value
- Why unsigned int 0xFFFFFFFF is equal to int -1?
- What is the significance of return 0 in C and C++?
- How do I use valgrind to find memory leaks?
- “error: assignment to expression with array type error” when I assign a struct field (C)
- munmap_chunk(): invalid pointer
- What is the LD_PRELOAD trick?
- What is the argument for printf that formats a long?
- Using %s in C correctly – very basic level
- How do you make an array of structs in C?
- Fastest JSON reader/writer for C++
- What is the difference between const int*, const int * const, and int const *?
- How to create my own header file in c++?
- Is there a function to copy an array in C/C++?
- C error: Expected expression before int
- Returning string from C function
- Char Comparison in C
- C – The %x format specifier
- What does it mean to write to stdout in C?
- what is the unsigned datatype?
- Examples of good gotos in C or C++
- Reading a string with scanf
- getopt_long() — proper way to use it?
- C read file line by line
- C read file line by line
- Copying a part of a string (substring) in C
- Incompatible implicit declaration of built-in function ‘malloc’
- expression must have integral type
- Quick Way to Implement Dictionary in C
- gdb: “No symbol table is loaded”
- Going through a text file line by line in C
- How to use glOrtho() in OpenGL?
- Reversing a string in C
- When a number is written as 0x00… what does the x mean
- How to remove the character at a given index from a string in C?
- waitpid, wnohang, wuntraced. How do I use these
- Convert C program into assembly code
- C: error: expected ‘)’ before ‘;’ token
- execv vs execvp, why just one of them require the exact file’s path?
- difference between
and - Writing binary number system in C code
- What are 0x01 and 0x80 representative of in C bitwise operations?
- Convert char array to string use C
- How to make parent wait for all child processes to finish?
- Use of cudamalloc(). Why the double pointer?
- OpenGL — GL_LINE_LOOP —
- Valgrind complains with “Invalid write of size 8”
- How to print an unsigned char in C?
- Read and write to binary files in C?
- Expression must be a pointer to a complete object type using simple pointer arithmetic
- Difference between sizeof(char) and sizeof(char *)
- How to empty a char array?
- Undefined reference to main – collect2: ld returned 1 exit status
- What does ** mean in C?
- Is there a way to have printf() properly print out an array (of floats, say)?
- How do you allow spaces to be entered using scanf?
- How can I do GUI programming in C?
- Preventing console window from closing on Visual Studio C/C++ Console application
- What is the proper equivalent of “while(true)” in plain C?
- How do I compile the asm generated by GCC?
- What is the difference between %g and %f in C?
- What is the source of the data for the ProgramFiles, ProgramW6432Dir, ProgramFilesDir (x86), CommonProgramFiles environment variables?
- Structure padding and packing
- Allocating char array using malloc
- Implementation of strtok() function
- C fopen vs open
- switch case: error: case label does not reduce to an integer constant
- warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
- File format not recognized; treating as linker script using GCC
- warning: return makes pointer from integer without a cast but returns integer as desired
- Dynamic vs static array in c
- Suggestions needed: Effective Java to C source code converter
- The difference between char * and char[] [duplicate]
- How to clear input buffer in C?
- In C, what exactly happens when you pass a NULL pointer to strcmp()?
- Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file
- Constructor for structs in C
- Implicit function declarations in C
- Convert long long to string in C?
- how to stop a loop arduino
- How to normalize a mantissa
- Compiler warning – suggest parentheses around assignment used as truth value