VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Veristand tlc error.

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.

0 Kudos
Message 1 of 17
(7,157 Views)

### 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.

0 Kudos
Message 2 of 17
(7,148 Views)

Hi LnT,

 

Have you checked this Microsoft kb or this Mathworks forum thread?


0 Kudos
Message 3 of 17
(7,068 Views)

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'

0 Kudos
Message 4 of 17
(7,032 Views)

Hi LnT,

 

  1. What version of VeriStand are you using? This information is printed on the very top of the MATLAB command window.
  2. Is the motion source successfully compiled? Specifically, do you see the creation of motion.obj in the auto-generated folder <motion_niVeriStand_rtw> ?
  3. If the motion.c fails during compilation, usually the compiler will report sensible information as to the cause of the issue. This error is reported before the Linking procedure. Do you see any error\messages reported during compilation of motion.c?
  4. Attempt running the auto-generated batch file to view more information.
    1. Open a command prompt
    2. Within the command prompt navigate to the location of <motion_niVeriStand_rtw> folder
    3. Within the command prompt run the *.bat file in <motion_niVeriStand_rtw> folder
    4. After executing the batch file, do you see additional information hinting as to the cause of the linking issue?
Nestor
0 Kudos
Message 5 of 17
(6,991 Views)

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.

0 Kudos
Message 6 of 17
(6,931 Views)

Hi LnT,

 

  1. Please confirm all Veristand 2013 patches are installed. The MATLAB command,  NIVeriStand_Version, should return '2013.0.1.0'.
  2. Does motion.obj exist in <motion_niVeriStand_rtw>?
  3. Please reply with the following:
    1. Delete <motion_niVeriStand_rtw> folder
    2. Compile the model via Simulink
    3. Reply with a txt file print of the MATLAB Command window
Nestor
0 Kudos
Message 7 of 17
(6,919 Views)

Hi 

 

1. >> NIVeriStand_Version

ans =

2013.0.1.0 (2013)

 

2. motion.obj exists in <motion_niVeriStand_rtw>

 

3. Please see attached .txt file

 

0 Kudos
Message 8 of 17
(6,916 Views)

Hi

 

Please see the attached copy of command window...

0 Kudos
Message 9 of 17
(6,915 Views)

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.

Nestor
0 Kudos
Message 10 of 17
(6,894 Views)