Problem Compiling lp_solve_5.5.2.0_cs.net

92 views
Skip to first unread message

Ranganath S

unread,
Sep 22, 2021, 2:28:44 AM9/22/21
to lp_solve
Hello,

    I am trying to compile lp_solve_5.5.2.0_cs.net code with some customisation using VS 2017 on Windows 10. I am getting the below error. The error is encountered at lpsolve.make_lp. 

An unhandled exception of type 'System.BadImageFormatException' occurred in demo.exe
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

  Please help me on how to compile this.

Regards,
RS
  
   

Claes Åkerberg

unread,
Dec 21, 2021, 3:22:52 PM12/21/21
to lp_solve
Hello
I have the same problem. Did you find any solution?
Regards 
Claes

Peter Notebaert

unread,
Dec 21, 2021, 4:33:51 PM12/21/21
to Claes Åkerberg, lp_solve
If you compile/run it in  32-bit mode you  must use the 32-bit lpsolve55.dll and if you compile/run it in 64-bit bit mode you must use the 64-bit version of the lpsolve55.dll

Peter

--
You received this message because you are subscribed to the Google Groups "lp_solve" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lp_solve+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lp_solve/f3b9fa5e-9f0f-43cd-af12-784e121d577en%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Claes Åkerberg

unread,
Dec 22, 2021, 2:37:04 AM12/22/21
to lp_solve
Hello
Thanks, I will try that!
Claes

Claes Åkerberg

unread,
Dec 22, 2021, 3:27:01 AM12/22/21
to lp_solve
Hi
I am using this in the bin directory
lpsolve55.dll       625 664 bytes   2020-12-30
from
lp_solve_5.5.2.11_dev_win64.zip 

But the same problems.
Is this the right dll?
Claes

Claes Åkerberg

unread,
Dec 23, 2021, 7:37:33 AM12/23/21
to lp_solve
Now it works

Problem #1
lpsolve55.Init(Server.MapPath("."))
instead of 
lpsolve55.Init(".")

Problem #2
Dim lp as long 
instead of
dim lp as integer

Now it works fine and I can relax.

Claes
Reply all
Reply to author
Forward
0 new messages