- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I have installed Intel C++ compiler on Scientific Linux 5.3, it work fine, just compiling a few files together in one executable needs to be done in the way like this
if I am uisng the standard Makefile like this
I am getting the segmentation fault, I have installed also Eclipse Ganimede and I have integrated intel C++ compiler in it, everything works fine, but again the multiple files projecst with automaticaly generated Makefiles do not go, the same code compiles and executes great in Microsoft Visual Stusio 2008, provided I have developed it on linux, usin Intel C++ compiler, I would like to understand how to use efficiently the Makefiles on Gnu Linux systems with your compiler, it works OK when using gcc but you know that gcc do not deal with C++ as good as Intel's compiler.
Is there is something I should change in the configuration?
Regards, Andrei
I have installed Intel C++ compiler on Scientific Linux 5.3, it work fine, just compiling a few files together in one executable needs to be done in the way like this
[cpp]icpc pilotZp.cc zp.cc -o zpx[/cpp]
if I am uisng the standard Makefile like this
[cpp]CC= icc CIBLE= zpx SOURCE= pilotZP.cc zp.cc $(CIBLE): $(SOURCE) $(CC) $(SOURCE) -o $(CIBLE) zp.o: zp.cc zp.h pilotZP.o: pilotZP.cc zp.h clean: rm -f $(OBJ) $(CIBLE) *.o[/cpp]
I am getting the segmentation fault, I have installed also Eclipse Ganimede and I have integrated intel C++ compiler in it, everything works fine, but again the multiple files projecst with automaticaly generated Makefiles do not go, the same code compiles and executes great in Microsoft Visual Stusio 2008, provided I have developed it on linux, usin Intel C++ compiler, I would like to understand how to use efficiently the Makefiles on Gnu Linux systems with your compiler, it works OK when using gcc but you know that gcc do not deal with C++ as good as Intel's compiler.
Is there is something I should change in the configuration?
Regards, Andrei
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would guess that by attempting to link a C++ application by using a C compiler without specifying -lstc++, you get errors associated with the missing library specification. It would be similar whther using gcc where you meant g++, or icc where you meant icpc. It's possible the .o file may be made OK, if the C compiler automatically shifts into C++ on account of the .cc suffix, but there is no information passed in the link stage to invoke a shift into C++ mode.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - atatart
Hello ,
I have installed Intel C++ compiler on Scientific Linux 5.3, it work fine, just compiling a few files together in one executable needs to be done in the way like this
if I am uisng the standard Makefile like this
I am getting the segmentation fault, I have installed also Eclipse Ganimede and I have integrated intel C++ compiler in it, everything works fine, but again the multiple files projecst with automaticaly generated Makefiles do not go, the same code compiles and executes great in Microsoft Visual Stusio 2008, provided I have developed it on linux, usin Intel C++ compiler, I would like to understand how to use efficiently the Makefiles on Gnu Linux systems with your compiler, it works OK when using gcc but you know that gcc do not deal with C++ as good as Intel's compiler.
Is there is something I should change in the configuration?
Regards, Andrei
I have installed Intel C++ compiler on Scientific Linux 5.3, it work fine, just compiling a few files together in one executable needs to be done in the way like this
[cpp]icpc pilotZp.cc zp.cc -o zpx[/cpp]
if I am uisng the standard Makefile like this
[cpp]CC= icc CIBLE= zpx SOURCE= pilotZP.cc zp.cc $(CIBLE): $(SOURCE) $(CC) $(SOURCE) -o $(CIBLE) zp.o: zp.cc zp.h pilotZP.o: pilotZP.cc zp.h clean: rm -f $(OBJ) $(CIBLE) *.o[/cpp]
I am getting the segmentation fault, I have installed also Eclipse Ganimede and I have integrated intel C++ compiler in it, everything works fine, but again the multiple files projecst with automaticaly generated Makefiles do not go, the same code compiles and executes great in Microsoft Visual Stusio 2008, provided I have developed it on linux, usin Intel C++ compiler, I would like to understand how to use efficiently the Makefiles on Gnu Linux systems with your compiler, it works OK when using gcc but you know that gcc do not deal with C++ as good as Intel's compiler.
Is there is something I should change in the configuration?
Regards, Andrei
add
libdir = (your way lib icc)
includedir = (your way include icc)
Curious not observed problem with Makefile and icc with standart program ??
Best regard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would guess that by attempting to link a C++ application by using a C compiler without specifying -lstc++, you get errors associated with the missing library specification. It would be similar whther using gcc where you meant g++, or icc where you meant icpc. It's possible the .o file may be made OK, if the C compiler automatically shifts into C++ on account of the .cc suffix, but there is no information passed in the link stage to invoke a shift into C++ mode.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
I would guess that by attempting to link a C++ application by using a C compiler without specifying -lstc++, you get errors associated with the missing library specification. It would be similar whther using gcc where you meant g++, or icc where you meant icpc. It's possible the .o file may be made OK, if the C compiler automatically shifts into C++ on account of the .cc suffix, but there is no information passed in the link stage to invoke a shift into C++ mode.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
The usual practice is to use CXX to refer to the C++ compiler. You can't call what you have done a "standard" way of using C++. In your sample, if you would change CC to CXX and icc to icpc, it ought to work.
Hi,
thank you for your replies; I will work on it, calling this Makefile a standard one I was thinking on C language and gcc, Ive just installed Intel C++ compiler and this is the first application I am developing using it.
Best Regards, atatart
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page