ManuSoft

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Microsoft Visual C/C++ Environment

E-mail Print

To make it less confusing when working with multiple versions of ObjectARX, I recommend removing the ObjectARX SDK folders from your global VC settings, and adding them instead to the project settings for each individual project. Doing so gives you more local control over the project, and makes it less confusing when you need different build configurations to use different versions of ObjectARX in the same project.

I highly recommend setting up system environment variables to point to the locations of various versions of the ObjectARX SDK, as well as different versions of the MFC and C/C++ runtime libraries. This allows your build settings to specify the locations of include and library files using environment variables, thus making your projects much more portable across platforms and directory structures.

For example, I have every version of the ObjectARX SDK since ARX 1.0 installed on my system, and I have an environment variable pointing to the root of every SDK version, as follows:

Variable Value Description
ARX1 E:\SDK\ARX1 ARX 1.0 SDK (R13)
ARX2 E:\SDK\ARX202 ObjectARX 2.02 SDK (R14)
ARX2000 E:\SDK\ARX2000 ObjectARX 2000 SDK
ARX2000i E:\SDK\ARX2000i ObjectARX 2000i SDK
ARX2002 E:\SDK\ARX2002 ObjectARX 2002 SDK
ARX2004 E:\SDK\ARX2004 ObjectARX 2004 SDK
ARX2005 E:\SDK\ARX2005 ObjectARX 2005 SDK
ARX2006 E:\SDK\ARX2006 ObjectARX 2006 SDK
ARX2007 E:\SDK\ARX2007 ObjectARX 2007 SDK
ARX2008#32 E:\SDK\ARX2008.32 ObjectARX 2008 (x86) SDK
ARX2008#64 E:\SDK\ARX2008.64 ObjectARX 2008 (x64) SDK
ARX2009 E:\SDK\ARX2009 ObjectARX 2009 SDK
ARX2010 E:\SDK\ARX2010 ObjectARX 2010 SDK
ARX2013 E:\SDK\ARX2013 ObjectARX 2013 SDK
ARX2015 E:\SDK\ARX2015 ObjectARX 2015 SDK

The same thing should be done with other SDK code, including common tool libraries that are designed and maintained internally. In addition to the ObjectARX SDKs, I also have environment variables pointing to each version of Visual C/C++. Those are named MSVC2, MSVC4, MSVC42, MSVC5, MSVC6MSVC7MSVC71MSVC8, MSVC9, MSVC10, and MSVC11, and each environment variable points to the root of the library (i.e. the VC98 folder for VC6, the VC7 folder for VC7, and so on).

Once these environment variables are set up, you can refer to specific folders for specific SDKs in the VC project settings by using the notation $(MSVC6)\Include (to point the VC6 C/C++ runtime include files) or $(MSVC42)\MFC\Lib (for VC4.2 MFC library files). The goal is to completely eliminate hardcoded paths from your project settings, thus making the projects portable. In addition to making the projects portable, this approach makes dependent SDKs portable as well. Moving an SDK to a different location or installing an updated SDK in a new location becomes as simple as changing an environment variable and rebuilding the project.

Assuming environment variables have been set to point to each version of VC, the following strings specify include and library paths for each version of VC:

Version Include Path
Library Path
VC 4.2 $(MSVC42)\Include;$(MSVC42)\MFC\Include
$(MSVC42)\Lib;$(MSVC42)\MFC\Lib
VC 6 $(MSVC6)\Include;$(MSVC6)\MFC\Include;$(MSVC6)\ATL\Include
$(MSVC6)\Lib;$(MSVC6)\MFC\Lib;$(MSVC6)\ATL\Lib
VC 7 $(MSVC7)\Include;$(MSVC7)\ATLMFC\Include
$(MSVC7)\Lib;$(MSVC7)\ATLMFC\Lib
VC 7.1 $(MSVC71)\Include;$(MSVC71)\ATLMFC\Include
$(MSVC71)\Lib;$(MSVC71)\ATLMFC\Lib
VC 8 $(MSVC8)\Include;$(MSVC8)\ATLMFC\Include
x86: $(MSVC8)\Lib;$(MSVC8)\ATLMFC\Lib
x64: $(MSVC8)\Lib\AMD64;$(MSVC8)\ATLMFC\Lib\AMD64
VC 9 $(MSVC9)\Include;$(MSVC9)\ATLMFC\Include
x86: $(MSVC9)\Lib;$(MSVC9)\ATLMFC\Lib
x64: $(MSVC9)\Lib\AMD64;$(MSVC9)\ATLMFC\Lib\AMD64
VC 10 $(MSVC10)\Include;$(MSVC10)\ATLMFC\Include
x86: $(MSVC10)\Lib;$(MSVC10)\ATLMFC\Lib
x64: $(MSVC10)\Lib\AMD64;$(MSVC10)\ATLMFC\Lib\AMD64
VC 11 $(MSVC11)\Include;$(MSVC11)\ATLMFC\Include
x86: $(MSVC11\Lib;$(MSVC11)\ATLMFC\Lib
x64: $(MSVC11)\Lib\AMD64;$(MSVC11)\ATLMFC\Lib\AMD64
You are here: Resources ObjectARX Tips and Tricks MSVC Environment for ObjectARX