رفتن به مطلب

رضا


1376Reza1376

ارسال های توصیه شده

سلام و خسته نباشید. من یکسری فایل با اسامی disloc.c/disloc_mex.c/disloc.mexa/disloc.mexapi64

دااخل کدی که گرفتم همشون m فایل بودن و به فایل disloc.c ارجاع داده شده ولی ارور میده. اولین ارور که میده میگه اصلا چنین تابعی وجود نداره با این اسم 

از کامپایلر MinGW استفاده کردم و وقتی عبارت های mex disloc.c و mex disloc_mex.c رو میزنم داخل متلب با این ارور ها مواجه میشم: 

"undefined reference to "Disloc
collect2.exe: error: ld returned 1 exit status

mex disloc.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:20:1: warning: return type defaults to
'int' [-Wimplicit-int]
 mexFunction()
 ^~~~~~~~~~~
In file included from
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:10:0,
                 from
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:13,
                 from D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:22:
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/_mingw.h:
In function 'mexFunction':
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/_mingw.h:540:36:
error: nested function '__debugbreak' declared 'extern'
 __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void)
                                    ^~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/_mingw.h:540:36:
error: static declaration of '__debugbreak' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/_mingw.h:539:14:
note: previous declaration of '__debugbreak' was here
 void __cdecl __debugbreak(void);
              ^~~~~~~~~~~~
In file included from D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:22:0:
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:208:30:
error: nested function 'fabsf' declared 'extern'
   __CRT_INLINE float __cdecl fabsf (float x)
                              ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:208:30:
error: static declaration of 'fabsf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:202:25:
note: previous declaration of 'fabsf' was here
   extern  float __cdecl fabsf (float x);
                         ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:219:36:
error: nested function 'fabsl' declared 'extern'
   __CRT_INLINE long double __cdecl fabsl (long double x)
                                    ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:219:36:
error: static declaration of 'fabsl' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:203:30:
note: previous declaration of 'fabsl' was here
   extern long double __cdecl fabsl (long double);
                              ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:230:31:
error: nested function 'fabs' declared 'extern'
   __CRT_INLINE double __cdecl fabs (double x)
                               ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:230:31:
error: static declaration of 'fabs' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:204:25:
note: previous declaration of 'fabs' was here
   extern double __cdecl fabs (double _X);
                         ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:412:28:
error: nested function '__fpclassifyl' declared 'extern'
   __CRT_INLINE int __cdecl __fpclassifyl (long double x) {
                            ^~~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:412:28:
error: static declaration of '__fpclassifyl' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:407:22:
note: previous declaration of '__fpclassifyl' was here
   extern int __cdecl __fpclassifyl (long double);
                      ^~~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:438:28:
error: nested function '__fpclassify' declared 'extern'
   __CRT_INLINE int __cdecl __fpclassify (double x) {
                            ^~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:438:28:
error: static declaration of '__fpclassify' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:409:22:
note: previous declaration of '__fpclassify' was here
   extern int __cdecl __fpclassify (double);
                      ^~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:460:28:
error: nested function '__fpclassifyf' declared 'extern'
   __CRT_INLINE int __cdecl __fpclassifyf (float x) {
                            ^~~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:460:28:
error: static declaration of '__fpclassifyf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:408:22:
note: previous declaration of '__fpclassifyf' was here
   extern int __cdecl __fpclassifyf (float);
                      ^~~~~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:525:28:
error: nested function '__isnan' declared 'extern'
   __CRT_INLINE int __cdecl __isnan (double _x)
                            ^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:525:28:
error: static declaration of '__isnan' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:520:22:
note: previous declaration of '__isnan' was here
   extern int __cdecl __isnan (double);
                      ^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:546:28:
error: nested function '__isnanf' declared 'extern'
   __CRT_INLINE int __cdecl __isnanf (float _x)
                            ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:546:28:
error: static declaration of '__isnanf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:521:22:
note: previous declaration of '__isnanf' was here
   extern int __cdecl __isnanf (float);
                      ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:565:28:
error: nested function '__isnanl' declared 'extern'
   __CRT_INLINE int __cdecl __isnanl (long double _x)
                            ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:565:28:
error: static declaration of '__isnanl' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:522:22:
note: previous declaration of '__isnanl' was here
   extern int __cdecl __isnanl (long double);
                      ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:611:28:
error: nested function '__signbit' declared 'extern'
   __CRT_INLINE int __cdecl __signbit (double x) {
                            ^~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:611:28:
error: static declaration of '__signbit' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:607:22:
note: previous declaration of '__signbit' was here
   extern int __cdecl __signbit (double);
                      ^~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:624:28:
error: nested function '__signbitf' declared 'extern'
   __CRT_INLINE int __cdecl __signbitf (float x) {
                            ^~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:624:28:
error: static declaration of '__signbitf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:608:22:
note: previous declaration of '__signbitf' was here
   extern int __cdecl __signbitf (float);
                      ^~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:636:28:
error: nested function '__signbitl' declared 'extern'
   __CRT_INLINE int __cdecl __signbitl (long double x) {
                            ^~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:636:28:
error: static declaration of '__signbitl' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:609:22:
note: previous declaration of '__signbitl' was here
   extern int __cdecl __signbitl (long double);
                      ^~~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:687:22:
error: nested function 'sinhf' declared 'extern'
   __CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); }
                      ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:687:22:
error: static declaration of 'sinhf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:685:24:
note: previous declaration of 'sinhf' was here
   extern float __cdecl sinhf(float _X);
                        ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:693:22:
error: nested function 'coshf' declared 'extern'
   __CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); }
                      ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:693:22:
error: static declaration of 'coshf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:691:24:
note: previous declaration of 'coshf' was here
   extern float __cdecl coshf(float _X);
                        ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:699:22:
error: nested function 'tanhf' declared 'extern'
   __CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); }
                      ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:699:22:
error: static declaration of 'tanhf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:697:24:
note: previous declaration of 'tanhf' was here
   extern float __cdecl tanhf(float _X);
                        ^~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:723:22:
error: nested function 'expf' declared 'extern'
   __CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); }
                      ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:723:22:
error: static declaration of 'expf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:721:24:
note: previous declaration of 'expf' was here
   extern float __cdecl expf(float _X);
                        ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:741:22:
error: nested function 'frexpf' declared 'extern'
   __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
                      ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:741:22:
error: static declaration of 'frexpf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:739:16:
note: previous declaration of 'frexpf' was here
   extern float frexpf(float _X,int *_Y);
                ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:755:30:
error: nested function 'ldexpf' declared 'extern'
   __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp ((double)x, expn); }
                              ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:755:30:
error: static declaration of 'ldexpf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:753:24:
note: previous declaration of 'ldexpf' was here
   extern float __cdecl ldexpf(float _X,int _Y);
                        ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:885:30:
error: nested function 'hypotf' declared 'extern'
   __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);}
                              ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:885:30:
error: static declaration of 'hypotf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:883:24:
note: previous declaration of 'hypotf' was here
   extern float __cdecl hypotf (float x, float y);
                        ^~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:892:22:
error: nested function 'powf' declared 'extern'
   __CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); }
                      ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:892:22:
error: static declaration of 'powf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:890:24:
note: previous declaration of 'powf' was here
   extern float __cdecl powf(float _X,float _Y);
                        ^~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1069:31:
error: nested function 'copysign' declared 'extern'
   __CRT_INLINE double __cdecl copysign (double x, double y)
                               ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1069:31:
error: static declaration of 'copysign' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1063:25:
note: previous declaration of 'copysign' was here
   extern double __cdecl copysign (double, double); /* in libmoldname.a */
                         ^~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1076:30:
error: nested function 'copysignf' declared 'extern'
   __CRT_INLINE float __cdecl copysignf (float x, float y)
                              ^~~~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1076:30:
error: static declaration of 'copysignf' follows non-static declaration
C:/ProgramData/MATLAB/SupportPackages/R2021b/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/math.h:1064:24:
note: previous declaration of 'copysignf' was here
   extern float __cdecl copysignf (float, float);
                        ^~~~~~~~~
D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c: In function 'Disloc':
D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:152:16: warning: implicit declaration
of function 'printf' [-Wimplicit-function-declaration]
                printf("Warning: model %d is not physical. It will not contribute to the
                deformation.\n",i+1);
                ^~~~~~
D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:152:16: warning: incompatible implicit
declaration of built-in function 'printf'
D:\Thises\GBIS\GBIS_V1.1\GBIS\DeformationSources\disloc\disloc.c:152:16: note: include '<stdio.h>' or
provide a declaration of 'printf'

لینک به دیدگاه

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...