DPI ERROR WHILE COMPILING ON QUESTA : Undifeined function 'ippfilter_real64' introduced from ..../MYlib.so
2 次查看(过去 30 天)
显示 更早的评论
Hi All,
I am using Matlab 2020.
I created C,C++ code using MATLAB DPIGEN feature. I am working on Linux System. When I was compiling created files on QuestaSim, I received an error 'Undifeined function 'ippfilter_real64' introduced from ..../MYlib.so' There is a header file called libmwippfilter.h which includes the prototype of the 'ippfilter_real64'. I dig deeper and found that it is called inside imfilter function. (Please refer)
How can I fix this problem? I tried to call coder.config('dll') and coder.config('lib') but it did not work.
Matlab gives a make file to use files generated from MATLAB DPI GEN to create SystemVerilog DPI files.
As far as I understand, it creates SRC by using all *.c files to create OBJ and then created SHARED LIBRARY. Is it possible to find 'ippfilter_real64' function and put it into my folder including all files to create it by using make file given below.
Or, is there another way to create a STANDALONE C function. I tried following page but I could not achieve. (Matlab Question --> Referrance Web Page )
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
SHARE_LIB_NAME=DPI_Component.so
all: $(SRC) $(SHARE_LIB_NAME)
@echo "### Successfully generated all binary outputs."
$(SHARE_LIB_NAME): $(OBJ)
gcc -shared -lm $(OBJ) -o $@
.c.o:
gcc -c -fPIC -Wall -pedantic -Wno-long-long -fwrapv -O0 $< -o $@
Regards,
Hakan
6 个评论
Vignesh
2022-6-16
Hakan,
Yes, it is technically possible to create a standalone C function including imfilter and other Image Processing Toolbox function. The following links include information on generating standalone code and packaging code.
When you use the "codegen" command the generated C code will be standalone. Using the codegen command you can create MEX, DLL, EXE by setting the coder build configuration object (i.e. coder.config(<target_file>) ). The generated MEX file will of course need MATLAB to run. The others DLL and EXE can run standalone. Using packNGo, you should be able to package all the required files to run the code standalone.
回答(1 个)
Tianqi Liu
2022-6-10
Hi Hak,
Thanks for the clarification. This "-o output" option is used to specify the name of the generated library only. In Windows platform you can only get .dll library. In Linux platform you can only get .so library. If you want to do the cross-platform dpi generation, you can follow the steps in the "Port Generated Component and Test Bench to Linux" section of the following document:
Thanks,
Tianqi
10 个评论
Tianqi Liu
2022-6-16
Hi Hak,
If all your work is done in linux and code generation configuration is set to coder.config('dll'), you should get a generated .so library directly from codegen or dpigen without using makefile separately. If you are doing cross-platform compile, using packNGo should package all the dependecy files that are needed to compile the .so library.
If you have futher questions, you can contact technical support. And we can invetigate it further.
Thanks,
Tianqi
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!