开发者

How can I run make command by using specific gcc compiler?

I have to run make command using specific version gcc compiler (using gcc-4.1 because after that versions will give deprecated method warnings or errors).. Now, there are several versions of gcc installed in the server. Can anybody help, how can I run it (make com开发者_StackOverflowmand) to a specific version gcc compiler (means on gcc-4.1).


You can do:

CC=gcc-4.1 make

That will fill the $(CC) variable of your make. Also, you can write:

make CC=gcc-4.1


If your makefile does not reset the compiler and your rules do not have the compiler hardcoded, you can use the CC and CXX environment variables to control what compiler will be used.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜