开发者

Installing flex (lexical analyzer) on Mac

开发者 https://www.devze.com 2023-02-15 08:41 出处:网络
Can someone tell me how I can install flex (lexical analyze开发者_运维百科r) on my Mac? I searched everywhere on google and I can\'t find it. I have the universal binary and I extracted it to my deskt

Can someone tell me how I can install flex (lexical analyze开发者_运维百科r) on my Mac? I searched everywhere on google and I can't find it. I have the universal binary and I extracted it to my desktop but I have no idea where to go from here. Any help would be greatly appreciated!


Try using Homebrew (Packet manager for Mac) and use the following command :-

brew install flex


You can use macports to install flex


You can always install from source. Download the tarball from the flex site, extract it, cd to the directory where you extracted it, and run the following:

./configure
make
make install
make clean

Assuming you have make and a C compiler on your Mac, which I believe all Macs have.


Flex is shipped with the xCode Command line tools; you only got to install them via xcode > preferences > downloads > Command line tools. This also includes gcc (Clang).


This info can help to somebody to save time:

Just today I have try to install FLEX 2.5.39 from sources. Make - fails.

After some thoughts I have decide to try older archives. 2.5.38 - fail 2.5.37 - OK

It seems on now() = 2015-03-15, macport also uses 2.5.37 build.

0

精彩评论

暂无评论...
验证码 换一张
取 消