Author Topic: Compiler/tagging config for Matlab mex file projects  (Read 5312 times)

LBCEi

  • Senior Community Member
  • Posts: 273
  • Hero Points: 21
Compiler/tagging config for Matlab mex file projects
« on: July 03, 2010, 03:43:23 AM »
Does anyone else out there use SlickEdit for working on Matlab mex file (e.g., Simulink S-function) projects?

If so, I could use some help setting things up so that the Matlab types and functions are tagged.  I've been living without this for a long time and decided I'd ask for some help. 

I've tried adding the Matlab include directories to the Directories tab in Project Properties but this doesn't seem to help.  I don't have any trouble building since the project is really a Visual Studio project using a Makefile, so the build finds everything it needs.

Here is a screenshot showing some code with lots of 'symbol not found' coloring for Matlab types and functions.

Thanks,
Les

LBCEi

  • Senior Community Member
  • Posts: 273
  • Hero Points: 21
Re: Compiler/tagging config for Matlab mex file projects
« Reply #1 on: July 06, 2010, 11:04:22 PM »
Well, I've found a semi-satisfactory solution to this problem.

I added a "C/C++" Tag Files tag database with the necessary Matlab include files (see first screenshot).

However, I would like to use an environment variable in the path to these files instead of an absolute path.  I do this in the Project properties, Directories path for include files (see second screenshot).  

In other words, I would like to replace "C:\Program Files\MATLAB\R2007b\" in the tag file path with "%(MATLABROOT)%\" like I used in the Project Properties.  Is this possible?

The .vtg file is binary, so editing that is not an option.  I haven't found any place to enter the path, one can only browse to it.

Thanks
Les


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: Compiler/tagging config for Matlab mex file projects
« Reply #2 on: July 15, 2010, 06:23:59 PM »
If you create the tag file at the root directory of your source files and then add the files, the files are added relative to the tag file itself.  This is the only way to do this until there is a configurable "source file path" property in the tag file.

LBCEi

  • Senior Community Member
  • Posts: 273
  • Hero Points: 21
Re: Compiler/tagging config for Matlab mex file projects
« Reply #3 on: July 15, 2010, 06:45:15 PM »
Thanks for the response, Clark.

Unfortunately, in this case, relative paths aren't any better than absolute paths. 

The reason for wanting to use an environment variable is so that, when updating to a new version of Matlab, the paths are updated to point to the files corresponding to the Matlab version in use.  I generally have several versions installed at any given time because our simulation models don't all get tested/updated for compatibility with new versions at the same time.  We switch back and forth as needed and the environment variable approach takes care of this just fine for our builds but, apparently, won't do so for the tagging.

Any chance of adding this as a feature request for a future release?

Thanks
Les