Yes, but you have to specify the language using the -x
option:
# Specify input file as stdin, language as C
flex -t lexer.l | gcc -o lexer.o -xc -
More Related Contents:
- Change stack size for a C++ application in Linux during compilation with GNU compiler
- What is the -fPIE option for position-independent executables in gcc and ld?
- LD_LIBRARY_PATH vs LIBRARY_PATH
- How do I force make/GCC to show me the commands?
- GNU gcc/ld – wrapping a call to symbol with caller and callee defined in the same object file
- Calling printf in extended inline ASM
- How to specify new GCC path for CMake
- How do I check if gcc is performing tail-recursion optimization?
- Prefetching Examples?
- How to stop MinGW and MSYS from mangling path names given at the command line
- How to determine maximum stack usage in embedded system with gcc?
- How to cross compile from Mac OS X to Linux x86?
- how to install gcc on windows 7 machine?
- How to make gcc warn about passing wrong enum to a function
- How to detect SSE/SSE2/AVX/AVX2/AVX-512/AVX-128-FMA/KCVI availability at compile-time?
- How to define a string literal in gcc command line?
- -isystem on a system include directory causes errors
- Does a compiler always produce an assembly code?
- What is the difference between “gcc -s” and a “strip” command?
- Linux process stack overrun by local variables (stack guarding)
- Why gcc 4.1 + gcov reports 100% branch coverage and newer (4.4, 4.6, 4.8) reports 50% for “p = new class;” line?
- Why would one use #include_next in a project?
- CMake and Static Linking
- linking arbitrary data using GCC ARM toolchain
- Hiding symbol names in library
- valgrind, gcc 6.2.0 and “-fsanitize=address”
- Mathematical functions for SIMD registers
- How to view C preprocessor output?
- What exactly is LLVM?
- What’s the difference between -O3 and (-O2 + flags that man gcc says -O3 adds to -O2)?