From: Marc O. i L. <mar...@tr...> - 2003-11-07 08:46:45
|
Alexandre Tolmos wrote: > Hi Marc, > > There is already a driver for Win32 called "driver2.cpp" in "src" but=20 > I don't know if it's up to date and suitable for VS.NET. > No, it's not up to date, unfortunately. > Btw, which version of OpenC++ did you use ? I commited a patch on the = > 1st of November which completes the MacOS X port and upgrades the =20 > garbage collector to version 6.3alpha2. I recommend you to upgrade to = > the latest HEAD revision. > Yes, I'm aware of your patches, and I generated the patch with CVS. The point is that in Win32 you need to generate the DLLs for the=20 compile-time classes in a very different way from Unix. And in Visual=20 Studio you can't just tell it to call occ.exe instead of cl.exe (MS'=20 compiler). So you need a different Metaclass implementation and a=20 different driver. Fortunately, it's easy to separate concerns: The library 1) Parses C++. 2) Transforms it according to some metaclasses. And the driver a) Provides a way of creating metaclasses. b) Loads those and passes them to the library (when the library demands=20 them). c) Offers some kind of interface to the outside, be it substituting the=20 usual call to the compiler, be it another different way. Of course, a and b can be independent, as long as there is a common=20 protocol. It's possible to create a driver that has all metaclasses=20 already compiled in, for example. Or the driver could use some scripting = language to implement the metaclasses. Anyway, I think patching driver2.cpp so that it works under Win32 is=20 wrong, what should be done is separating concerns and allowing an easier = way to create drivers. Of course, occ should be kept as the included=20 driver, because it works perfectly on Unix as a command-line substitute=20 of gcc. Regards, Marc Ordinas i Llopis > Alex > > Le jeudi, 6 nov 2003, =E0 16:42 Europe/Paris, Marc Ordinas i Llopis a = > =E9crit : > >> Hi, >> >> We are going to use OpenC++ in a project, but we need to have a =20 >> working Win32 version. Creating a driver for use in VisualStudio.NET = >> is not easy, as the editor does not allow changing the compiler =20 >> executable. So I've had to separate OpenC++ in two parts, a library =20 >> and a driver. This requires very small modifications to the project, = >> and can be a step towards having a more modular code organization. >> >> I send you a patch (taken using cvs diff -u) with the required =20 >> changes, and I plan on having a Windows driver in short time. >> >> Regards, >> >> Marc Ordinas i Llopis > > > -----------------------------------------------------------------------= -=20 > - > Alexandre Tolmos > E: ktulu at free.fr > ICQ: 92964905 > -----------------------------------------------------------------------= -=20 > - > "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." > -----------------------------------------------------------------------= -=20 > - |