C++ stylistic concerns?

Steve smorrey at gmail.com
Wed Mar 21 22:16:04 MDT 2007


Essentially the build process involves building a single "main.cpp" file
Everything else is headers, it then needs to link to the relevant
system libs such as wgl, glx, agl etc.

Each platform also has a single #define that needs handed to the
preprocessor, #define WINDOWS, #define LINUX and #define MACINTOSH.
That will pull in the relevant headers.

The main problem I'm suffering from is trying to get all these IDE's
to not stomp on one another, but at this point I'ld be happy to just
get the build process consistant.

Your project looks pretty awesome though!

On 3/21/07, Brian Hawkins <brianhks at activeclickweb.com> wrote:
> I use CPMake (www.cpmake.org - I wrote it).  The documentation is badly
> out of date.  It is basically a nice way of abstracting the compilers
> for each platform and unifying your script into one.  I've used it to
> compile Java code, C# code, C++ code and just about anything else I can
> think of.
>
> Right now I have a project that is probably 70% common code and runs on
> both Mac and Windows.  Probably similar to what you are doing but you
> most likely have less common code.  In both cases I compile by typing
> "java make" at the command prompt.
>
> I'll be more then happy to setup a build script for your project.  A
> really cool thing with cpmake is that it is all contained in two very
> small jar files that you can put right into your project.
>
> Email me off the list with the layout of your project and I'll send you
> a sample build script to start from.
>
> Brian
>
> Steve wrote:
> > Oh good because this is turning into a nightmare of various IDE projects.
> >
> > Windows... Visual Studio 2k5 Express
> >
> > Linux, Code::Blocks (Make was choking at first, but doesn't now due to
> > the change in layout so I may switch back to makefiles for Linux.
> >
> > Mac, XCode (I really, really hate this IDE)
> >
> > If you have a good crossplatform development solution I would be much
> > obliged, since a unified build environment would speed things up
> > dramatically.
> >
> > Thanks!
> >
> > On 3/21/07, Brian Hawkins <brianhks at activeclickweb.com> wrote:
> >> Question:  what build tool(s) are you using on each platform?  The
> >> reason I ask is that I have one that kicks butt for writing cross
> >> platform code.
> >>
> >> Brian
> >>
> >> Steve wrote:
> >> > Well I think I may have just figured out one reason for not doing it
> >> > this way.
> >> > Windows (Visual C++ .net 2005), is completely ignoring the namespace
> >> > constraint.
> >> > So my CreateWindow function was being confused by the compiler with
> >> > Windows own CreateWindow function.  Hence a lot of errors about
> >> > missing variables.
> >> > My guess is the compiler is treating the .h file using c syntax rules
> >> > rather than c++ syntax rules.
> >> > Changing my .h to a .cpp fixes the issue.
> >> > Thats a less than optimal solution though :(
> >> >
> >> > For what it's worth it's working like a charm on Mac and Linux.
> >> >
> >> > On 3/21/07, Michael L Torrie <torriem at chem.byu.edu> wrote:
> >> >> On Wed, 2007-03-21 at 10:45 -0600, Steve wrote:
> >> >> > Thus far it's looking to be dual licensed, GPL (free) and
> >> >> > closed-commercial (fee of some sort)  Other than that I'm not
> >> sure and
> >> >> > don't much care, as long as the check clears :D
> >> >>
> >> >> This does make my last comments about OpenGL moot.  I still think
> >> they
> >> >> are way out in left field though.
> >> >>
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> /*
> >> >> PLUG: http://plug.org, #utah on irc.freenode.net
> >> >> Unsubscribe: http://plug.org/mailman/options/plug
> >> >> Don't fear the penguin.
> >> >> */
> >> >>
> >> >
> >> > /*
> >> > PLUG: http://plug.org, #utah on irc.freenode.net
> >> > Unsubscribe: http://plug.org/mailman/options/plug
> >> > Don't fear the penguin.
> >> > */
> >> >
> >>
> >> /*
> >> PLUG: http://plug.org, #utah on irc.freenode.net
> >> Unsubscribe: http://plug.org/mailman/options/plug
> >> Don't fear the penguin.
> >> */
> >>
> >
> > /*
> > PLUG: http://plug.org, #utah on irc.freenode.net
> > Unsubscribe: http://plug.org/mailman/options/plug
> > Don't fear the penguin.
> > */
> >
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>



More information about the PLUG mailing list