- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]Hi All,What may be causing this ? and What is the possible solution ?
When I follow the steps given below using -parallel compiler option, I come across "undefined reference" linking errors for the lines begining with "int main()" and some return statements in my source code:
icpc -g -fPIC -O2 -parallel -c myapp.cc -o myapp.o icpc -o myapp myapp.o myapp.o: In function `main': myapp.cc:230: undefined reference to `__kmpc_begin' //"int main()" line myapp.cc:230: undefined reference to `__kmpc_global_thread_num' //"return false" line myapp.cc:1852: undefined reference to `__kmpc_end' //"return false" line myapp.cc:1842: undefined reference to `__kmpc_end' //"return false" line myapp.cc:1832: undefined reference to `__kmpc_end' //"return false" line myapp.cc:1822: undefined reference to `__kmpc_end' //"return false" line myapp.o: In function `__sti__$E': myapp.cc:1921: undefined reference to `__kmpc_begin' myapp.o: In function `__sti__$E': /usr/include/c++/4.4.1/iostream:65536: undefined reference to `__kmpc_end' make: *** [myapp] Error 1 [/bash]
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
You need to add -parallel in your link command line. That should solve the problem.
You need to add -parallel in your link command line. That should solve the problem.
Thank you. -- Feilong H. Intel Developer Support Tools Knowledge Base: http://software.intel.com/en-us/articles/tools |
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