compile .C file Include library using mex - error LNK2019: unresolved external symbol - for NPTrackingTools
Mostra commenti meno recenti
Hello I'm trying to build simple C function with external commands provide by library NPTrackingTools API
#include <stdio.h>
#include "mex.h"
#include "NPTrackingTools.h"
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
int ret1,ret2,ret3;
ret1=TT_Initialize();
ret2=TT_FinalCleanup();
ret3=TT_Shutdown();
printf("Hello, World! \n");
return 0;
}
I tried the following compiler code
mex -v '-Id:\or hirshfeld\onedrive\work control lab aero summer 2014 technio\C_code' '-LD:\or hirshfeld\onedrive\work control lab aero summer 2014 technion\C_code' '-lNPTrackingToolsx64.lib' test_C_compile_with_include_trackingtools.c
I have all files in the same directory "d:\or hirshfeld\onedrive\work control lab aero summer 2014 technio\C_code"
but the compiler return an error that he can't understand my commands
Error using mex
Creating library test_C_compile_with_include_trackingtools.lib and object test_C_compile_with_include_trackingtools.exp
test_C_compile_with_include_trackingtools.obj : error LNK2019: unresolved external symbol __imp_TT_Initialize referenced in
function mexFunction
test_C_compile_with_include_trackingtools.obj : error LNK2019: unresolved external symbol __imp_TT_Shutdown referenced in function
mexFunction
test_C_compile_with_include_trackingtools.obj : error LNK2019: unresolved external symbol __imp_TT_FinalCleanup referenced in
function mexFunction
test_C_compile_with_include_trackingtools.mexw64 : fatal error LNK1120: 3 unresolved externals
I tried different variation but still have the same problem, can you help me?
Thanks
Or Hirshfeld
אור הירשפלד
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!