[Coin-discuss] Using COIN under Visual Studio 2005

hpwalton at comcast.net hpwalton at comcast.net
Thu Apr 27 23:37:06 EDT 2006


I'm seeking feedback on how to best help contribute my porting work back to COIN.  I have a few observations and a few dilemas.  I want your feedback...  
When I get some good feedback, I'll take it up with appropriate project managers inside COIN...that appears to be the proper protocol?  Is there another protocol?  I've already gotten the permission slip from my mom (Contributor's Statement of Respect for Ownership)
The good news: porting to Visual Studio 2005 (MSVC8) doesn't seem all that tough.
The bad news: There are some bumps along the way, and I have a question on the best "makefile/project" approach.
There are 2 porting things to address:
1- An iterator definition which isn't 100% complete in OsiCuts, (I submitted an email on this a bit earlier today)
2- instrumenting code to export symbols for MS's DLL cludge.
#1 can be fixed with a quick code add,.
#2 is a deeper thing.
Maybe someone out there knows a magic flag for the MSFT compiler, but I find myself instrumenting several classes in order to make the library useful under MSVC8.  Maybe this is going over old ground and I just didn't see anything in the last 4 months of discussion.  I've included the technical changes at the bottom under "Instrumenting code"...
On a related note: I have permission from my management to spend some time contributing.  I've emailed briefly with JP.  He indicated that I might could work on a visual studio project setup which is robust. 
Here are 2 options.  Any opinions on what is more desirable?
1- Visual Studio 2005 projects with relative paths.._might_ work most of the time.
2- gmake makefiles which use the MSFT compiler and flags
For reference, I'm compiling COIN, Osi, Clp, Cbc, OsiCbc, OsiClp.  I can probably port more given decent direction (and suitable code).
Philip 
hpwalton at gmail.com

Notes on instumenting code:
This block of macros would be somewhere in a common header:
#ifndef COINDOTNET_H
#define COINDOTNET_H
#ifdef MICROSOFTCOMPILER
#ifdef COINMSDLL
#define COINCLASSEXP __declspec(dllexport)
#else
#define COINCLASSEXP __declspec(dllimport)
#endif
#pragma warning(disable:4290)
#endif
#endif
And then any classes which need exposure would need:
... 
class COINCLASSEXP CoinPackedMatrix {
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060428/9945b94d/attachment.html>


More information about the Coin-discuss mailing list