- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to compile with -O0 because debugging information is lost when optimization is performed.
That can be done with icc by adding the -finline option, but not with icx.
OK :icc -finline -O0 main.c -o main -diag-disable=10441
NG :icx -finline -O0 main.c -o main
/usr/bin/ld: /tmp/main-da54d5.o: in function `main':
main.c:(.text+0x5): undefined reference to `abc'
icx: error: linker command failed with exit code 1 (use -v to see invocation)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please add the "static" before inline in sub.h file?
static inline int abc(void)
Using static keyword forces the compiler to consider this inline function in the linker.
You can refer to the below screenshot for the output.
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks and Regards,
Pendyala Sesha Srinivas

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