Simulink library linking error

6 vues (au cours des 30 derniers jours)
Voulgarakis Georgios
Voulgarakis Georgios le 16 Avr 2014
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.
To be precise, the error I get on matlab command prompt is:
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
Any help would be deeply appreciated! Thanks in advance!

Réponse acceptée

Voulgarakis Georgios
Voulgarakis Georgios le 28 Avr 2014
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).
  1 commentaire
tommaso colombo
tommaso colombo le 6 Mar 2017
Could you please explain better all the steps you did to solve your problem? I have the same error. I am not an expert in building softwares... thank you tommaso

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by