开发者

cpp: "-c" is not a valid option to the preprocessor

I'm trying to build a p开发者_运维知识库ackage on a RedHat system. First, I ran ./configure CXX=cpp, because /usr/bin/cpp is the C++ compiler on that system. But when I run make, it dumps:

cpp: "-c" is not a valid option to the preprocessor

When I do a Google search, I found a number of complaints, but no solutions. Anyone else encounter this?


cpp is the C preprocessor; perhaps you mean cc (the C compiler) or gcc (for GNU C compiler) or g++ (for the GNU C++ compiler)?


cpp is the preprocessor, try c++ instead.


I had to install the cpp-g++ package. I'm not used to Redhat systems, and hadn't built a C++ program in quite a while, hence my confusion.

Thanks to all for your generous responses.


you probably are looking for g++ (GNU C++ Compiler) as cpp is the C preprocessor.

g++ is a special invocation of gcc in that it automatically includes a couple of directories needed for gcc's c++ runtime into the library search path.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜