Simulink library linking error

Illustration
kalpna thakur - 2021-09-18T11:25:51+00:00
Question: Simulink library linking error

Hi all, I have the following situation: 1) I have a sfunction builder block, where I have defined a function in C, which uses external library (libxml2 to be precise). I use visual studio 2010 to compile the sfunction. 2) I am able to build the sfunction, and when I simulate/run on computer, the system responds the way I want it. 3) Trying to build the model though creates an error. LINKING APPLICATION ... < lnkppc > (E) #A0368-D Unresolved external: xmlParseDoc (first referenced in module: parse.o50) xmlCharStrdup (first referenced in module: parse.o50) xmlDocGetRootElement (first referenced in module: parse.o50) Errors: 1, Warnings: 0 -- call "C:\SW\dSPACE RCPHIL 7.4\Compiler\PPCTools37\BIN\lnkppc.exe" -K0 -QmsA0314 -QmeA0307 -QmeA0329 -m..\test_parser.map -o ..\test_parser.ppc -c _tmp_test_parser.lk LINKING FAILED (1) MAKE PROCESS ABORTED  

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

In case anybody experiences the same problem as me:
 
What I did was to change the used library. Because I deploy he project on a platform which does not support win32 libraries, I had to include the source files of the library.
 
Also, in the Code Generation: I set as make command:
 
make_rti LNK_OPTS="-QmsA0314"
At last, do not forget to include all the libraries and any source files in: Code Generation/Custom Code/
 
These were enough to get my project running (although a major overhaul).
 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!