flexc++ command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
flexc++: command not found
or when using sudo you get the following error message
sudo: flexc++: command not found
Solutions to flexc++: command not found
How To Fix flexc++: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu flexc++ is provided by flexc++ package.
flexc++ is:
Flexc++ was designed after `flex’. Flexc++ offers as compared to flex’s C++ option a cleaner class-design.
Flexc++ generates a scanner class that is ready for use, as well as a member function producing the lexical scanner tokens (lex()). The class can easily be provided with additional members without the need for polymorphic functions. Consequently, classes generated by flexc++ have no virtual members and actually have but one public member: lex(), replacing the old-style flex and flex++ yylex() function.
Flexc++ offers many options, among which an option to define classes generated by flexc++ in a separate namespace. This allows developers to define additional symbols, even outside of the class generated by flexc++, without encountering name-collision problems. With flexc++, artificial means to prevent name-collisions, like the yy-conventions used by flex and flex++ are no longer required. Flexc++ generates C++ code. If C code is required, flex should be used. Flexc++’s grammar requirements are highly compatible with flex’s requirements, so converting a flex grammar into a flexc++ grammar should be fairly simple.
In addition to the flexc++ scanner generator itself and several skeleton files, the package contains an extensive man-page, as well as a full manual rewritten after the original flex manual, and several examples.
To fix this problem, we can install more using the command below.
sudo apt-get -y install flexc++
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install flexc++.
sudo apt -y install flexc++
Or if you have aptitude installed you can use the following command.
sudo aptitude install flexc++
Summary
In this tutorial we learn how to fix flexc++ command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.