- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> icc -o -fast *.cpp
NLMG.h
NRUTIL.cpp -> NRUTIL.o
NLMG.cpp -> NLMG.o
NRUTIL.h
The compiler creates the *.o files without any problems.
>icc -o roll_icc NRUTIL.o NLMG.o -lm
Getting this error when I try to link all the *.o files
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
Platform : SUSE Linux (Opteron)
Thanks
NLMG.h
NRUTIL.cpp -> NRUTIL.o
NLMG.cpp -> NLMG.o
NRUTIL.h
The compiler creates the *.o files without any problems.
>icc -o roll_icc NRUTIL.o NLMG.o -lm
Getting this error when I try to link all the *.o files
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
Platform : SUSE Linux (Opteron)
Thanks
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure you've run the script "iccvars.sh" to set up the necessary build environment before using the "icc".
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't remember exactly when the change was made, but icpc is the command currently intended for linking C++.
If you run nm on the .o file you make when compiling the main() function (with -c, but without the -fast option), the main symbol should show there. Your link message says no main() function is found.
If you run nm on the .o file you make when compiling the main() function (with -c, but without the -fast option), the main symbol should show there. Your link message says no main() function is found.
Message Edited by tim18 on 08-09-2005 02:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jennifer and Tim
I was able to download Version 9.0 of the Intel C++ compiler. Didn't have any problems with it.
Vimal
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