0

I need to use some library file that have been build using Visual Studio 2010 Professional (MSVCRT2010 compiler?!) and I am having trouble building my s-functions in another host machine. My target host machine does not have Visual Studio so MATLAB cannot pickup the C++ compiler. Also, LCC (MATLAB's native) compiler is probably different. How can I manage to do that without causing minimum hassle?

I can think about one thing - retargetting the library to be cross-compiler friendly. I have already done that when I got the library from my legacy code pool (UNIX GNU platform) and it was supposed to be running okay with any compiler after my retargetting. However, it has come back to bit me.

Is it something regarding redistributable VS files? or am I driving myself insane?

The error msg I am getting is:

  Writing library for y_ing_sl_ver.mexw32 
  File c_src_~1\lg_com~1\y_ing.obj contains unknown section .rtc$TMZ. 
  .text section assumed 
  File c_src_~1\lg_com~1\y_ing.obj contains unknown section .rtc$IMZ. 
  .text section assumed 
  c_src_~1\lg_com~1\ymginteg.obj .rtc$TMZ: undefined reference to '__RTC_Shutdown' 
  c_src_~1\lg_com~1\ymginteg.obj .rtc$IMZ: undefined reference to '__RTC_InitBase' 

 C:\PROGRA~2\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'y_ing_sl_ver.mexw32' failed. 
ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
  • Can you paste the build command? Are you linking your library? – remus Dec 01 '13 at 18:15
  • what do you mean? I build it from S-Function Builder block and my compiler is setup to be the `lcc` MATLAB's native compiler for code generation – ha9u63a7 Dec 01 '13 at 19:27
  • Let me ask you first if `__RTC_Shutdown` and `__RTC_InitBase` are defined in the external .dll file. I am using in my project an external .dll file and I did not run into any problems. You usually get `undefined reference` when the library is not linked to your building process. I'm not sure how to do that in the S-function builder block but I will take a look if those functions you have are defined there. – remus Dec 02 '13 at 09:24

0 Answers0