Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Zvi_Vered
Beginner
71 Views

C library compiled with Intel Compiler that runs under vxWorks

Hello,

We are using Intel Compiler 11.1/064 to compile a C code that contains heavy algorithm.

The output is a library (.a) that is linked to a C++ code compiled with diab compiler suplied with vxWorks 6.8

I'm aware that this combination is not supported by Intel but it works !

We have 2 problms:

1. The C code contains the routine "sin(...)". In vxWorks, the final link is done upon downloading the
executable to the target (compared to linux or windows). Upon downaloding I get an unresolved symbol:
_sse2_sin
It seems that Intel compiler has its own "sin". Am I right ?
How can I tell the intel compiler to use the "sin" supplied by vxWorks and not its own sin ?

2. Same question for memcpy. Upon download I get an unresolved symbol: fast_memcpy. I did not call to this routine. But I did call to "memcpy".

Thank you in advance for your help,

Zvika.
0 Kudos
2 Replies
aazue
New Contributor I
71 Views

Hi
Difficult to answer without vxW & diab compiler installed ....
Maybe ... Read , about flags, how impacting
-nodefaultlibs
-nostdlib


-nostdlib
Do not use the standard system startup files or libraries when
linking. No startup files and only the libraries you specify will
be passed to the linker. The compiler may generate calls to mem-
cmp, memset, and memcpy for System V (and ISO C) environments or to
bcopy and bzero for BSD environments. These entries are usually
resolved by entries in libc. These entry points should be supplied
through some other mechanism when this option is specified.

Regards

Zvi_Vered
Beginner
71 Views

The solution: addthe switch-fno-builtin

This way routines like memcpy ,sin are taken from the OS.

Thanks.