Why do I receive errors when trying to build my model which has a CAN PCI I/O board using xPC Target 1.1 (R12)?
When I try to build my model using the xpctarget.tlc system target file, I receive the following errors:
### Compiling myOsc.c cl /c /O2 /Ot /nologo /W0 -DMODEL=myOsc -DRT -DNUMST=4 -DTID01EQ=1 -DNCSTATES=2 -DMT=1 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV= myOsc.c myOsc.c C:\matlabR12\simulink\include\simstruc.h(1) : note C6311: unknown(0) : see previous definition of 'RT' ### Compiling xpctarget.c cl /c /O2 /Ot /nologo /W0 -DMODEL=myOsc -DRT -DNUMST=4 -DTID01EQ=1 -DNCSTATES=2 -DMT=1 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV= C:\matlabR12\toolbox\rtw\targets\xpc\target\build\src\xpctarget.c xpctarget.c ### Linking ... C:\matlabR12\sys\perl\win32\bin\perl C:\matlabR12\rtw\c\tools\mkvc_lnk.pl myOsc.lnk myOsc.obj rt_sim.obj rt_nonfinite.obj xpctarget.obj ode5.obj canac2pcireceive.obj rs232send.obj rs232setup.obj canac2pcisetup.obj link /DEBUG /NOLOGO /DLL /DEF:xpcvcdll.def /Include:_malloc C:\matlabR12\toolbox\rtw\targets\xpc\target\build\lib\rttheap.lib rtwlib.lib @myOsc.lnk -out:myOsc.dll Creating library myOsc.lib and object myOsc.exp canac2pcireceive.obj : error LNK2001: unresolved external symbol _CANPC_read_rcv_data2_mb1 ... ... myOsc.dll : fatal error LNK1120: 72 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop. <snip>
XPCTEST runs fine, but I still see the above errors.
Best Answer