- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached is simple reproducer that works on Mac with:
s1038899:~ kbelco$ icpc --version
icpc (ICC) 19.1.3 20200925
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
but fails on Linux with Intel 19.1.4
The name mangling is different, you get the leading underscore on the Mac which is correct but on Linux you don't get the leading underscore.
I have to inline the source code since the attachment is rejected.
#include "junk.hpp"
int foo(char*) {
return 0;
}
void foo2(char*) {
}
int main(int, char**) {
return 0;
}
Here's the Mac output:
s1038899:~ kbelco$ nm a.out | grep -i foo
0000000100000c10 T _foo
0000000100000c20 T _foo2
Here's the Linux output:
-bash-4.2$ nm a.out | grep -i foo
0000000000400c40 T foo
0000000000400c50 T foo2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for reaching out. We’ll check it and get back to you.
Regards
Gopika Ajit
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for reaching out. We’ll check it and get back to you.
Regards
Gopika Ajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Linux, it needs to be compatible with Gnu. If icpc generated _foo symbol, then there would be an "undefined reference to foo" when you try to link mix objects (compile with icpc/g++).
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please let us know if you have any other questions. Otherwise, we would like to close this topic.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's close this ticket. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Thanks,

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page