help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] GLPK compilation problem with Borland 5


From: Andrew Makhorin
Subject: Re: [Help-glpk] GLPK compilation problem with Borland 5
Date: Sat, 2 Aug 2008 16:24:21 +0400

> I am afraid I have to bother you with a stupid question. My ultimate
> goal is to be able to compile the example file sample.c. To make that
> work on my computer, I understood from some instructions I found that
> I need to compile glpk first on my computer (Windows XP, Borland 5
> compiler).

> I downloaded glpk 4.29 from one of the mirrors and tried to compile it
> by running the included Build_GLPK_with_BC5.bat file. Here is the
> output:

> C:\glpk\glpk-4.29\w32>rem Build GLPK with Borland C++ 5.0

> C:\glpk\glpk-4.29\w32>rem NOTE: Make sure that HOME variable specifies
> correct path.

> C:\glpk\glpk-4.29\w32>set HOME=C:\BC5

> C:\glpk\glpk-4.29\w32>copy config_BC5 config.h
>         1 file(s) copied.

> C:\glpk\glpk-4.29\w32>C:\BC5\bin\make.exe -f Makefile_BC5
> MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
>       bcc32.exe -I. -DHAVE_CONFIG_H -wall -I..\include
> -o..\src\glpapi01.obj -c ..\src\glpapi01.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\src\glpapi01.c:
> Error E2034 ..\src\glpapi01.c 71: Cannot convert 'void *' to 'GLPROW *
> *' in function create_prob(glp_prob *)
> Error E2034 ..\src\glpapi01.c 72: Cannot convert 'void *' to 'GLPCOL *
> *' in function create_prob(glp_prob *)
> Error E2034 ..\src\glpapi01.c 76: Cannot convert 'void *' to 'int *'
> in function create_prob(glp_prob *)
> Error E2034 ..\src\glpapi01.c 95: Cannot convert 'void *' to 'glp_prob
> *' in function glp_create_prob()
> Error E2034 ..\src\glpapi01.c 125: Cannot convert 'void *' to 'char *'
> in function glp_set_prob_name(glp_prob *,const char *)
> Error E2034 ..\src\glpapi01.c 157: Cannot convert 'void *' to 'char *'
> in function glp_set_obj_name(glp_prob *,const char *)
> Error E2034 ..\src\glpapi01.c 213: Cannot convert 'void *' to
> 'glp_tree *' in function glp_add_rows(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 230: Cannot convert 'void *' to 'GLPROW
> * *' in function glp_add_rows(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 235: Cannot convert 'void *' to 'int *'
> in function glp_add_rows(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 240: Cannot convert 'void *' to 'GLPROW
> *' in function glp_add_rows(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 310: Cannot convert 'void *' to 'GLPCOL
> * *' in function glp_add_cols(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 317: Cannot convert 'void *' to 'GLPCOL
> *' in function glp_add_cols(glp_prob *,int)
> Error E2034 ..\src\glpapi01.c 379: Cannot convert 'void *' to 'char *'
> in function glp_set_row_name(glp_prob *,int,const char *)
> Error E2034 ..\src\glpapi01.c 427: Cannot convert 'void *' to 'char *'
> in function glp_set_col_name(glp_prob *,int,const char *)
> Error E2034 ..\src\glpapi01.c 689: Cannot convert 'void *' to 'GLPAIJ
> *' in function glp_set_mat_row(glp_prob *,int,int,const int *
> const,const double * const)
> Error E2034 ..\src\glpapi01.c 807: Cannot convert 'void *' to 'GLPAIJ
> *' in function glp_set_mat_col(glp_prob *,int,int,const int *
> const,const double * const)
> Error E2034 ..\src\glpapi01.c 914: Cannot convert 'void *' to 'GLPAIJ
> *' in function glp_load_matrix(glp_prob *,int,const int * const,const
> int * const,const double * const)
> *** 17 errors in Compile ***

> ** error 1 ** deleting ..\src\glpapi01.obj

> I would really appreciate any help you can give me, I am really out of
> ideas... Thx A LOT

Hmm... This looks very strange, like C++ compilation; in C this is not
an error. I tried the batch file with both BC++ 5.02 and BC++ 5.5 (the
latter is Borland free command-line tools) and had no problems.

Try consulting the compiler documentation; probably there must be an
option to specify that you are compiling the code in C, not in C++, and
add that option to CFLAGS in Makefile_BC5.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]