LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2006, 11:20 AM   #1
kvtournh
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Mandriva
Posts: 91

Rep: Reputation: 15
multiple compilers icpc and g++


Hi,

I was wondering about something (logic since i post here)

I recently installed the intel c++ compiler and for this i need to set some environment variables. I have to add the libraries of intel to LD_LIBRARY_PATH. Now here is the thing I was wondering about.

If I set this environment, how does this thing know if it has to use the libraries of gnu or those from intel?

The reason i ask this is that intel does not use its own libraries. Compiling a simple program clearly showed this.

Code:
#include<iostream>
int main(void) {
std::cout << "flubber" << std::endl;
return 1;
}
Checking the used shared libraries gave the following
Code:
[]$ g++ hello.cpp
[]$ ldd a.out
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002afd01552000)
        libm.so.6 => /lib64/libm.so.6 (0x00002afd01753000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002afd018a9000)
        libc.so.6 => /lib64/libc.so.6 (0x00002afd019b7000)
        /lib64/ld-linux-x86-64.so.2 (0x00002afd01437000)
[]$ icpc hello.cpp
[]$ ldd a.out
        libm.so.6 => /lib64/libm.so.6 (0x00002b5cb279e000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b5cb28f4000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b5cb2af5000)
        libcxaguard.so.5 => /usr/local/intel/cce/9.1.042/lib/libcxaguard.so.5 (0x00002b5cb2c03000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b5cb2d04000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b5cb2f3e000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b5cb2683000)
You see that intel uses all the gnu libraries and links them together with libcxaguard. The question is, why? could anybody help me out here?
 
Old 12-20-2006, 02:18 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
i think there are sme flags like
-cxxlib-gcc

or i would do something like
echo "-no-gcc" >> /usr/bin/icc.cfg
echo "-no-gcc" >> /usr/bin/icpc.cfg

then add the -gcc flag when you need it.

you might want to read this
http://www.linuxfromscratch.org/hint...c-compiler.txt
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
analysis and answers to ACM ICPC? George2 Programming 0 08-03-2006 05:39 AM
c++ compilers metallica1973 Linux - Software 16 04-11-2006 11:23 AM
Comparing Intel C++ compiler (icpc) to gcc dllahr Programming 6 12-19-2004 04:58 PM
C++ Compilers (!~CoW~!) Linux - Software 12 11-18-2003 09:52 AM
Compilers... ChaosZ3RO Linux - Software 1 09-15-2003 06:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration