Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mlib and the error 3021 class compiled at different times

    Hi
    I've just made a package basetable for Stata which is available through ssc.
    It is mainly written in Mata and hence I tried saving the Mata code in a mlib.

    Now Stata 14 users are getting the error
    3021 class compiled at different times
    when using the package.
    Probably it is because I use xl() in my code and that xl() is from Stata 13.

    My question is: How do I remedy this the best way?
    I guess I have to remove the mlib from the adopath?
    But what is the best way to do so?

    Also I think from a small experiment I did that the Mata code will work across different versions if I insert the code into a Mata block inside the accompanying ado-file. Isn't that right?
    And still I most likely have to clean up after myself, right?
    Or is there a shorcut that fixes all?

    Looking forward to hear your answers
    Kind regards

    nhb

  • #2
    Hi again
    Problem solved.
    I've just moved the relatively small code part that used xl() from the mlib file to the accompanying ado-file.
    The corrections are send to ssc and awaits the update.

    So far so good.
    But it seems fair to warn against using Mata classes and functions defined by Stata Corp inside your own mlib library files.
    Keep the integrating code wether Mata or Stata in an ado-file.
    Kind regards

    nhb

    Comment

    Working...
    X