08-29-2014 04:01 AM
Hi
I am getting following error.
LINK : fatal error LNK1181: cannot open input file 'motion.obj'
*** Created DLL C:\Users\laxminat\Desktop\Git Simulator\motion_niVeriStand_rtw\motion.dll
C:\Users\laxminat\Desktop\Git Simulator\motion_niVeriStand_rtw>exit /B 0
### Successful completion of build procedure for model: motion
dll file is not created.
08-29-2014 05:22 AM
### Linking ...
C:\PROGRA~1\MATLAB\R2013b\sys\perl\win32\bin\perl C:\PROGRA~1\MATLAB\R2013b\rtw\c\tools\mkvc_lnk.pl motion.lnk motion.obj motion_data.obj rtGetInf.obj rtGetNaN.obj rt_backsubrr_dbl.obj rt_forwardsubrr_dbl.obj rt_logging.obj rt_lu_real.obj rt_matrixlib_dbl.obj rt_matrx.obj rt_nonfinite.obj rt_printf.obj NIVeriStand_main.obj rt_sim.obj motion.res sfun_PMS.obj sfun_thrust_allocation.obj
link /RELEASE /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll kernel32.lib advapi32.lib wsock32.lib @motion.lnk /dll -out:motion.dll
LINK : fatal error LNK1181: cannot open input file 'motion.obj'
*** Created DLL C:\Users\laxminat\Desktop\Git Simulator\motion_niVeriStand_rtw\motion.dll
C:\Users\laxminat\Desktop\Git Simulator\motion_niVeriStand_rtw>exit /B 0
### Successful completion of build procedure for model: motion
Matlab shows successful creation of dll file but .dll file is not created/present in folder.
09-05-2014 07:23 AM
09-08-2014 08:47 AM
Hi
Thanks for your reply. Now I have added s function links. but still I get following error during Matlab code generation.
### Linking ...
C:\PROGRA~1\MATLAB\R2013b\sys\perl\win32\bin\perl C:\PROGRA~1\MATLAB\R2013b\rtw\c\tools\mkvc_lnk.pl motion.lnk motion.obj motion_data.obj rtGetInf.obj rtGetNaN.obj rt_backsubrr_dbl.obj rt_forwardsubrr_dbl.obj rt_logging.obj rt_lu_real.obj rt_matrixlib_dbl.obj rt_matrx.obj rt_nonfinite.obj rt_printf.obj NIVeriStand_main.obj rt_sim.obj motion.res sfun_PMS.obj sfun_thrust_allocation.obj
link /RELEASE /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll kernel32.lib advapi32.lib wsock32.lib @motion.lnk /dll -out:motion.dll
LINK : fatal error LNK1181: cannot open input file 'motion.obj'
09-12-2014 12:58 PM
Hi LnT,
09-19-2014 02:56 AM
Hi NestorG
I am using VeriStand 2013.
I did step 4 as suggested by you, the error information at command prompt is exactly same as in Command Window of matlab.
09-19-2014 02:27 PM
Hi LnT,
09-19-2014 02:34 PM
Hi
1. >> NIVeriStand_Version
ans =
2013.0.1.0 (2013)
2. motion.obj exists in <motion_niVeriStand_rtw>
3. Please see attached .txt file
09-19-2014 02:37 PM
Hi
Please see the attached copy of command window...
09-19-2014 05:20 PM
Hi
The posted log reports an error in accessing 'sfun_PMS.obj'; this is different to the posted issue. The log indicates this object file isn't being created and thus the error we are seeing. Specifically I would expected to see text such as: "### Compiling sfun_PMS.c". I suspect you will have a similar link error with the other listed file, 'sfun_thrust_allocation.obj'.
Due to when the obj files are referenced in the link command, I suspect these are dependencies of an s-function. The object files may be referenced in motion.mk under the variable 'S_FUNCTIONS_LIB'. I would advice investigating where you can get a copy of these OBJ files and then placing them next to motion.obj.
After locating these files and placing in <motion_niVeriStand_rtw>, attempt to build the model once again. Note that executing the build from within MATLAB may automatically clear all obj-files in <motion_niVeriStand_rtw> and thus removing your manually copied file, fun_PMS.obj. If this is indeed the situation, then build via MATLAB, copy your files again into <motion_niVeriStand_rtw> and then manually run motion.bat.
If after all this the script still fails and object files, sfun_PMS.obj\sfun_thrust_allocation.obj are in <motion_niVeriStand_rtw>, then please reply with a similar text file log as you did before. This should be a different error log.