avk959 / LazLpSolveIDE

Lazarus port of LpSolveIDE
GNU Lesser General Public License v2.1
5 stars 1 forks source link

Fail the build #1

Open MMunozMarquez opened 5 years ago

MMunozMarquez commented 5 years ago

I had download the project and compiled successfully lazlpsolver.

When I load the project in the IDE I got "The component class "TLPSolver" can not be found. This is not registered through RegisterClass and lfm was not found. This is necessary for the unit: ./program/LazLpSolveIDE/source/main.pas"

Attached i send the output the command lazbuild LpSolveIDE.lpr lazbuild.log

Am I doing something wrong?

Thanks

avk959 commented 5 years ago

Did you compile /packages/lazlpsolver/lazlpsolver.lpk?

avk959 commented 5 years ago

Ah, I see ,you are using FPC 3.04. Sorry, my mistake, I have not tested the project with FPC 3.04. I hope the fix 9f85df6 will solve the problem.

MMunozMarquez commented 5 years ago

I had installed the package lblpsolve55-dev package which seems to be required in ubuntu.

Now I get a new error: /usr/lib/liblpsolve55.a(lp_lib.o): undefined reference to symbol 'fmod@@GLIBC_2.2.5'

As far as I know this can be solved using the option -lm at the end of the compiler command. But I don't know how to do that using lazaruside.

lazbuild.log

Thanks.

avk959 commented 5 years ago

I've intentionally installed the lpsolve55-dev package, but can't reproduce the error you described. build.log My environment: Ubuntu MATE 16.04(virtual), Lazarus 2.0(stable) + FPC 3.04(stable) installed locally using fpcdeluxe utility.

mingodad commented 4 years ago

Hello I also got the same problem reported by manuelmunozmarquez and on linux I've got it to work adding tthis to LpSolve unit:

unit LpSolve;

{$I lpsolve.inc}
{$ALIGN ON}
{$MINENUMSIZE 4}
{$IFNDEF FPC}
  {$WEAKPACKAGEUNIT}
{$ELSE}
  {$MODE DELPHI}
{$ENDIF}
{$IFDEF LINUX}
  {$DEFINE UNIX}
  {$LINKLIB colamd}  //this is for colmad* and other missing symbols
  {$LINKLIB m} // This is for fmod@@GLIBC_2.2.5
{$ENDIF}   
avk959 commented 4 years ago

Thank you for sharing.