Question on Xpress.license function

I am using Xpress and JuMP packages to solve LP problem. First i need to initialize xpress license. There’s a function under Xpress lib.jl:

function XPRSlicense(_i1, _c1)

ccall((:XPRSlicense, libxprs), Cint, (Ptr{Cint}, Cstring), _i1, _c1)

Which arguments should I provide?
For example, in C# - i would call XPRS.License(ref oemVal, ref oemMsg) where first arg is int and second one is string.
That didn’t work with Xpress.license function.
Thanks for your help!

If you are using Xpress.jl and JuMP.jl you should not need to call XPRSlicense(_i1, _c1) by hand, just have the license file in the expected folder. I have used both together in the past and I did not need to validate the license manually, this is done automatically.


I have an official xpauth.xpr from fico and their’s trial one that comes with xpress install. If i use official xpauth.xpr in my xpress/bin - it gives me an error that "This is an OEM license but the specified OEM number is incorrect. " If i remove oem part from .xpr file - it give me “invalid signature” error. So I’ve been using the trial xpauth.xpr - which is initialized fine. I wonder if the trial one has limitations on problem size, such as number of rows and columns.
In our C# code we adjust OEM value to make it work with officially provided .xpr.

I have never needed to change the OEM number, so I cannot help you with that. I have used specific machine licenses in the past, but they always worked out of the box.


Thank you, that was very helpful feedback. I’ll see what can be done on our side.