中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > 综合其它
Use Intel C++ Compiler in Eclipse (CDT) under Win32
作者:未知 时间:2005-07-27 23:25 出处:CSDN 责编:chinaitpower
              摘要:Use Intel C++ Compiler in Eclipse (CDT) under Win32
Introduction
Eclipse provides a very good C++ IDE, called CDT. Under Windows(2K,xp), if you want to compiler C++ programs using CDT, some configurations must be done unless you installed Cygwin or MingGW.
Here are some tips to use Intel C++ compiler in Eclipse (CDT).

What you need?
    Intel C++ Compiler (I use version 8.1)
    Microsoft Visual Studio or Visual Studio .Net (I use .Net 2003)

Follow these steps:

1. Install Intel C++ Compiler.

2. Modify User Environment Variable INLCUDE as, depending on your specific path
 INCLUDE = C:\Program Files\Intel\CPP\Compiler80\Ia32\Include;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\

3. Modify User Environment Variable LIB as, depending on your specific path
LIB=C:\Program Files\Intel\CPP\Compiler80\Ia32\Lib;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib

4. Open Eclipse(CDT), New->Standard Make C++ Project, name it say "test1".

5. Add a source file into the project, say "test1.cpp".

6. Add a file named "makefile", with content as the following:

all: test1.exe
    
test1.exe: test1.obj
    icl test1.obj
test1.obj: test1.cpp
    icl test1.cpp

clean:
    del *.obj
    del *.exe

7. Open Project -> Properties -> C/C++ make Project -> make Builder
    Build Command -> disable  "use default"
              -> Fill in Build Command:  nmake -f makefile CPP=icl.exe LINK32=xilink.exe    

8. Now you can build your C++ project using Intel C++ Compiler.

Note:

1. Because I can not set LIB and INCLUDE Environment Variables in the makefile, I did it once in System/User
Environment Variables (My Computer->Properties->Advanced->Environment Variables->User Variables for xxx). You may set those in the makefiles if you can to save space for systems.

2. all and clean targets  are needed by Eclipse. Of course you can set these targets to something else in Project->Properties->C/C++ Make Project->Make Builder.

3. Library issue: the Intel C++ Compiler provides libm.lib and libirc.lib. Microsoft provides libc.lib and oldnames.lib. Additional libraries must be provided if your programm needs them. Most of these libs are provided in Visual Studio (.Net),
that's why it needs installed on your computer.
    
If you want to link your program with alternate or additional libraries, neither Intel C++ Compiler nor Visual Studio (.Net) provides, specify them at the end of the command line. For example, to compile and link hello.c with mylib.lib, use the following command in makefile :

icl /Fehello.exe hello.cpp mylib.lib

4. Why use Eclipse for C++ Programming?
Simply because Eclipse+CDT is better. Of course that's just the personal favor.

 




 


关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有