[Clp] Compiling Clp and CoinUtils in MS Visual Studio 10

Wolfgang Hartmann cmat.wolfgang at gmail.com
Wed Mar 12 05:40:31 EDT 2014


Hi,
its me again, Wolfgang, working on CMAT.

At first I tried to compile CoinUtils-2.9.16 together with Clp-1.15.6
using C/C++ with MS Visual Studio 2010. There were quite a number of
errors which I was not able to get rid off. Obviously the Linux gcc
compiler is much more fogiving than MS Visual C/C++. (I made the same
experience when I switched from Watcom to MS Visual C/C++ and I found
quite a number of code problems.)

Now I also downloaded the following two versions:
- Clp-1.14.8 and CoinUtils-2.8.8
- Clp-1.15.0 and CoinUtils-2.9.0

 When I compile the version of: Clp-1.14.8 and CoinUtils-2.8.8
I have only problems with the Cholesky factorization of Clp!!
And that should be solvable for me and I guess I have
just a few questions before I get this DLL working:-)
Please see below for a small number of problems. And I would
be very, very thankful if you can help me.

Wolfgang


BTW, I have made a very nice DLL of the Concorde code for the
Traveling Salesman Problem by William Cook from the University
of Waterloo and many other coworkers.
Based on the main driver routines concorde.c amd lk_main.c I
have made two subroutines with only one input argument which is
the pointer to a structure with all information needed
for in- and output. Naturallu, I have my own input parsing and
could not use that from the main prgrams in the Concorde package.
Since my software (CMAT) has already many static libraries and
DLLs I have to keep the number of dllexport's and dllimport's low.
If anybody wants the source of the two driver functions and the
header with the communication structure, I'm willing to mail that.


/*-------------------------------------------------------------------*/
/*--- Clp-1.14.8 and CoinUtils-2.8.8 : Use no precompiled headers ---*/


1>ClCompile:
1>  ClpCholeskyWssmpKKT.cpp
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2065: 'wsetmaxthrds' :
undeclared identifier
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2065: 'WSETMAXTHRDS' :
undeclared identifier
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2078: too many
initializers
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2143: syntax error :
missing ';' before '('
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2062: type 'const int'
unexpected
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(67): error C2059: syntax error : ')'
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(69): error C2065: 'wssmp' :
undeclared identifier
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(69): error C2065: 'WSSMP' :
undeclared identifier
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(69): error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
1>c:\cmat\xclp\clpcholeskywssmpkkt.cpp(69): error C2374: 'F77_FUNC' :
redefinition; multiple initialization

--------------------------------

This has obviously to do with:

// At present I can't get wssmp to work as my libraries seem to be out of
sync
// so I have linked in ekkwssmp which is an older version
#ifndef USE_EKKWSSMP
extern "C" {
void F77_FUNC(wsetmaxthrds,WSETMAXTHRDS)(const int* NTHREADS);

 void F77_FUNC(wssmp,WSSMP)(const int* N, const int* IA,
                           const int* JA, const double* AVALS,
                           double* DIAG,  int* PERM,
                           int* INVP,  double* B,
                           const int* LDB, const int* NRHS,
                           double* AUX, const int* NAUX,
                           int* MRP, int* IPARM,
                           double* DPARM);
void F77_FUNC_(wsmp_clear,WSMP_CLEAR)(void);

Maybe I should: #define USE_EKKWSSMP  1  ?????

--------------------------------

--------------------------------

This has obviously to do with:

1>  ClpCholeskyUfl.cpp
1>c:\cmat\xclp\clpcholeskyufl.cpp(11): fatal error C1189: #error :  "Need
to have AMD or CHOLMOD to compile ClpCholeskyUfl."

extern "C" {
#ifndef COIN_HAS_CHOLMOD
#ifndef COIN_HAS_AMD
#error "Need to have AMD or CHOLMOD to compile ClpCholeskyUfl."
#else
#include "amd.h"
#endif
#else
#include "cholmod.h"
#endif
}

Maybe I should set: #define COIN_HAS_CHOLMOD ???
Or is clpcholeskywssmp.cpp unused anyway?

--------------------------------

1>  ClpCholeskyMumps.cpp
1>c:\cmat\xclp\clpcholeskymumps.cpp(16): fatal error C1083: Cannot open
include file: 'dmumps_c.h': No such file or directory
1>  Generating Code...
1>

--------------------------------

This has obviously to do with:
extern "C" {
#include "dmumps_c.h"
#include "mpi.h"
}

Where would I find that file dmumps_c.h ??
It doesn't come with Clp or Coin_utils??
Or is clpcholeskymumps.cpp unused anyway?

--------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20140312/ebfa158a/attachment.html>


More information about the Clp mailing list