Eltiech / telepresence

Automatically exported from code.google.com/p/telepresence
0 stars 0 forks source link

using vs2012 building telepresence #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Using vs2012 compilation telepresence 

In the following error:
“tp-libavfilter.a(avf_showspectrum.o) : error LNK2019: 
无法解析的外部符号 _hypot,该符号在函数 _filter_frame 
中被引用”

Please provide any additional information below.

Original issue reported on code.google.com by tanningz...@gmail.com on 5 Feb 2015 at 3:05

GoogleCodeExporter commented 9 years ago
新建个 .cc 的文件, 自己实现一个 hypot 函数:

extern double fabs(double);
extern double sqrt(double);

#ifdef __cplusplus
extern "C" {
double hypot(double x, double y) {
  double ax = fabs(x), ay = fabs(y);
  double xy = x/y, yx = y/x;
  return ax > ay
    ? ax * sqrt(1.0 + yx*yx)
    : ay * sqrt(1.0 + xy*xy);
}
}
#endif // __cplusplus

Original comment by aday...@gmail.com on 15 Mar 2015 at 6:49