loadlibrary, problem location of system header files

4 Ansichten (letzte 30 Tage)
Tommy Vasek
Tommy Vasek am 24 Jun. 2020
I had a C library code I was able to call from my matlab on linux, I want to do it now on windows (which I never use, so know nothing about it). My project only has a project.c and a project.h files.
After different trial (mingw, but 32bit problem, etc.) I used Visual Studio to compile my code and produce a dll. I had to compile it in C++, which could be a problem later as loadlibrary use C code (but I think I have a way to deal with it), but even before I had a stupid problem.
I used vcpkg to install the gsl on windows, and I have in my project.h a line
#include <gsl/gsl_block.h>
Everything went fine on Visual Studio when I compiled, but matlab seems unable to find the gsl library, I have the following error : 'gsl/gsl_block.h'á: No such file or directory
I tried to use the syntax
#include "path_to_gsl/gsl/gsl_block.h"
but problem is that headers like gsl_block.h have inclusion from others header of the gsl, using the syntax
#include <gsl/gsl_ny_header.h>
So I would have to make a copy of all the headers in another repo and modify each of them...
Is there an easy to way to tell matlab where to find the system headers I include with <systeme_header.h> ? includepath doesn't seems to do the job.

Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by