[Coin-discuss] OsiGlpkSolverInterface.cpp don't compile on VS6

JP Fasano jpfasano at us.ibm.com
Wed Dec 11 18:52:15 EST 2002





Thanks.
The change has been put into the cvs repository.

JP Fasano
jpfasano at us.ibm.com
(914)945-1324  (tie line 862-1324)
COIN www.coin-or.org


|---------+------------------------------------------------>
|         |           Vivian De Smedt <vivian at vdesmedt.com>|
|         |           Sent by:                             |
|         |           coin-discuss-admin at www-124.southbury.|
|         |           usf.ibm.com                          |
|         |                                                |
|         |                                                |
|         |           12/11/2002 05:07 PM                  |
|         |           Please respond to coin-discuss       |
|         |                                                |
|---------+------------------------------------------------>
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       coin-discuss at www-124.southbury.usf.ibm.com                                   |
  |       cc:                                                                                    |
  |       Subject:  [Coin-discuss] OsiGlpkSolverInterface.cpp don't compile on VS6               |
  |                                                                                              |
  |                                                                                              |
  >----------------------------------------------------------------------------------------------|



Dear coin,

this small email just to tell you that (because of a uncomformity of VS6
and the c++ standart). OsiGlpkSolverInterface.cpp don't compile on that
platform.

The VS6 message is i redefinition arround line 1815 I propose to make the
obvious slight modification we are all used to namly replace

   for (int i=1; i <= numelem; i++)
     {
       index_adj[i] = index[i-1] + 1;
       value_adj[i] = value[i-1];
     }

   int j;
   for( j = 0; j < numrows; j++ )
     {
       setRowBounds( j, rowlb ? rowlb[j]:-inf, rowub ? rowub[j]:inf );

       // Note that we should really add one to start[j].  However, we need
       // to give GLPK the address one before that, so it turns out to be
       // just start[j]
       lpx_set_mat_row( model, j, start[j+1]-start[j],
                                &(index_adj[start[j]]),
&(value_adj[start[j]]) );
     }

   int i;
   for( i = 0; i < numcols; i++ )

by:

   int i;
   for (i=1; i <= numelem; i++)
     {
       index_adj[i] = index[i-1] + 1;
       value_adj[i] = value[i-1];
     }

   int j;
   for( j = 0; j < numrows; j++ )
     {
       setRowBounds( j, rowlb ? rowlb[j]:-inf, rowub ? rowub[j]:inf );

       // Note that we should really add one to start[j].  However, we need
       // to give GLPK the address one before that, so it turns out to be
       // just start[j]
       lpx_set_mat_row( model, j, start[j+1]-start[j],
                                &(index_adj[start[j]]),
&(value_adj[start[j]]) );
     }

   for( i = 0; i < numcols; i++ )

Yours,

Vivian De Smedt.

_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss






More information about the Coin-discuss mailing list