UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer zhou
Observer
1,748 Views
Registered: ‎09-22-2016

SDK undefined reference to 'exp'

Jump to solution

 hello,I got a strange problem about SDK.(I am using sdk 2017.1)

when I use exp function like 'float a =exp(3.0)',it is ok,but when I use 'exp' like :

float a = 9.0;

float b=exp(a);

then it doesn't work,and showing error: 'undefined reference to 'exp''.

 

how to fix it?12121233444.PNG

0 Kudos
1 Solution

Accepted Solutions
Scholar hbucher
Scholar
2,667 Views
Registered: ‎03-22-2016

Re: SDK undefined reference to 'exp'

Jump to solution

@zhou You have to link against the math library

 

https://www.xilinx.com/support/answers/52971.html

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
7 Replies
Scholar hbucher
Scholar
2,668 Views
Registered: ‎03-22-2016

Re: SDK undefined reference to 'exp'

Jump to solution

@zhou You have to link against the math library

 

https://www.xilinx.com/support/answers/52971.html

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Observer zhou
Observer
1,727 Views
Registered: ‎09-22-2016

Re: SDK undefined reference to 'exp'

Jump to solution

it is different from mine,I cann't find the right place.

 

5656.PNG

0 Kudos
Scholar hbucher
Scholar
1,722 Views
Registered: ‎03-22-2016

Re: SDK undefined reference to 'exp'

Jump to solution

@zhou There are several tabs missing 

Try hitting "Restore Defaults" 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Moderator
Moderator
1,717 Views
Registered: ‎09-12-2007

Re: SDK undefined reference to 'exp'

Jump to solution

 

exp.PNG

 

To Address this, right click on the application and select C/C++ Build Settings, and include the math lib:

 

math.PNG

 

0 Kudos
Scholar hbucher
Scholar
1,715 Views
Registered: ‎03-22-2016

Re: SDK undefined reference to 'exp'

Jump to solution

@stephenm Problem is that his settings Are missing those Configuration panels

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Moderator
Moderator
1,695 Views
Registered: ‎09-12-2007

Re: SDK undefined reference to 'exp'

Jump to solution

Can you send a screenshot of the C/C++ Build settings. Make sure that the Makefile Generation is selected

 

make.PNG

0 Kudos
Observer zhou
Observer
1,674 Views
Registered: ‎09-22-2016

回复: SDK undefined reference to 'exp'

Jump to solution
i gona to rebuild a project, and try again,thank you for your advice
0 Kudos