[Coin-discuss] Using COIN under Visual Studio 2005

Leo Lopes leo at sie.arizona.edu
Thu Apr 27 23:50:12 EDT 2006


I thought that at some point there was an alternate way of defining
what functions ended up in DLLs in MSVC: there was some kind of .def
file that listed the symbols that should be exported. Is that still
true? If so, would that be better than adding another define and
another platform-specific qualifier  to each declaration?

On 4/27/06, hpwalton at comcast.net <hpwalton at comcast.net> wrote:
>
>
>
> 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 {
>
> ...
>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
>


--
========================================================================
Leonardo B. Lopes                                    leo at sie.arizona.edu
Assistant Professor                                        (520)621-2342
SIE - University of Arizona  http://www.sie.arizona.edu/faculty/leolopes




More information about the Coin-discuss mailing list