Jump to content

Sourceboost Environment Variables

Recommended Posts



I'm currently involved in a project that is cross-platform with PIC microcontrollers and Windows PC machines. The PIC and Win32 code share a common codebase with common interfaces, but the implementations are platform-specific.


In visual studio I'm able to do something like #if defined(WIN32) in a master compile config header file so that it will only compile win32 stuff and ignore the PIC stuff, and this works very well in Visual Studio/Win32. My question is, does SourceBoost have similar Environment Variables defined by the IDE that I could use to detect that I'm compiling using SourceBoost or BoostC++, etc (and ergo automatically ignore Win32/64 stuff when compiling in SourceBoost)?



Thank you very much!



Share this post

Link to post
Share on other sites

From BoostC++ help...


Predefined macros

_BOOSTC always defined

_PIC16 defined for all supported PIC12 and PIC16 targets

_PIC16x defined if PIC16 extended instruction set is used (PIC16F193x and alike)

_PIC18 defined for all supported PIC18 targets




Share this post

Link to post
Share on other sites

Your content will need to be approved by a moderator

You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.