LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIT Unable to link while building a model DLL

Hello
I’m a new user of simulation interface toolkits, from a simple Simulink Mdl, I’m trying to build the project and create an NI dll, all compiles correctly but the linking fails with the following lines

### Linking ...
C:\MATLAB701\sys\perl\win32\bin\perl C:\MATLAB701\rtw\c\tools\mkvc_lnk.pl test1.lnk test1.obj test1_data.obj grt_main.obj nidll_main.obj rt_sim.obj rt_nonfinite.obj
link /RELEASE /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO -subsystem:console,4.0 msvcrt.lib libc.lib oldnames.lib kernel32.lib ws2_32.lib mswsock.lib advapi32.lib C:\MATLAB701\rtw\c\lib\win32\rtwlib_vc.lib @test1.lnk /dll -out:test1.dll
Creating library test1.lib and object test1.exp
test1.obj : error LNK2001: unresolved external symbol _rtmIsMajorTimeStep
test1.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

I’m using Matlab v 7.01, SIT 2.02, Visual studio 6.0 and Labview 7.1
I would appreciate hearing any suggestion
Thanks
0 Kudos
Message 1 of 4
(3,305 Views)
Hello deeloc

I need some more informations for helping you.
What do you do exactly, and when comes the error?

Do you convert a simulink model into an dll or do you use the .mdl file in LV ?

Or do you want to convert your LV programm in an dll with your application builder?

regards

Manuel Wielander
Message 2 of 4
(3,285 Views)
Hello Manuel...
Thanks for the Interest...
I have cleared the problem 🙂

I had a Simulink model that i wanted to use in LabView, i tried to build a NI-dll from it using SIT. To to that i just need to choose the nidll.tlc as target langquage compiler (pic confg1) and build it from Matlab using visual c++ compiler. I got this error during the Build process.
So what i realised later was, my Smulink model was using a S-function with custom code (a Wrapper). so had to implicitly declare where the compiler should look for extra files. to do this i just made some changes in the Smulink configuration parameter (see pic confg1)!

So this step is over!
Do you have experience with SIT?
Thanks again
Message 3 of 4
(3,275 Views)
Hi

i'm experiencing a similar problem: i'm trying to build a dll from a .mdl that contains a s-function block.
how did you wite the wrapper for the s-function?
i tried writng a .tlc file, with the line: "%CallAsCMexLevel1" , that has the same name of the s-function file.
Is it correct?
Maybe you did something different?

thanks a lot

Paolo Boscariol
0 Kudos
Message 4 of 4
(2,948 Views)