フィルターのクリア

linker error => LNK2005: "void * __cdecl process(void *)" (?process@@YAPEAXPEAX@Z) already defined in fconvblas.obj

8 ビュー (過去 30 日間)
hassan mahmood
hassan mahmood 2014 年 5 月 20 日
回答済み: hassan mahmood 2014 年 5 月 20 日
i m using this command
mex -O fconvblas.cc -lmwblas -O fconv.cc
and got these errors
fconv.obj : error LNK2005: "void * __cdecl process(void *)" (?process@@YAPEAXPEAX@Z) already defined in fconvblas.obj
fconv.obj : error LNK2005: mexFunction already defined in fconvblas.obj
Creating library C:\Users\hassan\AppData\Local\Temp\mex_TlKrc0\templib.x and object C:\Users\hassan\AppData\Local\Temp\mex_TlKrc0\templib.exp
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_exit referenced in function "void * __cdecl process(void *)" (?process@@YAPEAXPEAX@Z)
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_join referenced in function mexFunction
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_create referenced in function mexFunction
fconvblas.mexw64 : fatal error LNK1120: 3 unresolved externals
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'fconvblas.mexw64' failed.

回答 (1 件)

hassan mahmood
hassan mahmood 2014 年 5 月 20 日
still remain 2 errors
fconv.obj : error LNK2005: "void * __cdecl process(void *)" (?process@@YAPEAXPEAX@Z) already defined in fconvblas.obj
fconv.obj : error LNK2005: mexFunction already defined in fconvblas.obj
with the help of this thread
remaining 3 errors errors are removed
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_exit referenced in function "void * __cdecl process(void *)" (?process@@YAPEAXPEAX@Z)
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_join referenced in function mexFunction
fconvblas.obj : error LNK2019: unresolved external symbol __imp_pthread_create referenced in function mexFunction
fconvblas.mexw64 : fatal error LNK1120: 3 unresolved externals
http://www.mathworks.com/matlabcentral/answers/107106-error-lnk2019-unresolved-external-symbol-when-compiling-mex
I gave path of library folder, lib file name, header folder location
mex -O -I"C:\Users\hassan\Desktop\Pthread\include" -lpthreadVC2 -L"C:\Users\hassan\Desktop\Pthread\lib\x64" fconvblas.cc -lmwblas -O fconv.c
Any idea to remove other 2 remaaing errors? what is meant by mexFunction already defined in fconvblas.obj

カテゴリ

Help Center および File ExchangeBuild MATLAB Interface to C++ Library についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by