TYX CORPORATION

TYX Corporation

Productivity Enhancement Systems

 

 

 

 

 

 

Reference

TYX_0051_15

Revision

1.1

Document

HowToCompileWithMicrosoft7_0.doc

Date

September 3, 2004

 

 

 

 

 

 

How to compile with MSVC++7.0


 

 

Versions used:

Paws Studio:               1.26.7

Operating System:     Windows 2000

 

Requirements:

Paws developer Studio

Microsoft Visual Studio 7.0

If you are using the version 7.1 or the sdk packages 1.0 or 1.1, you will have to adjust the content of this document with the proper variables.

 

Introduction:

This document will help configuring the environment in order to use Microsoft Visual Studio 7.0 to compile a PAWS project, which includes a CEM module.

If you intend to use Win NT 4.0 or XP, you will find this document useful. Some of the details may however vary, such as when the environment variables are made available to other new or older instances of exes but those differences should be easy to overcome.

 

If your environment is not set up properly, you will have building problems.

The first problem that you will have is that it won’t be able to find the compilers. If you have an rc file for the dll version, it will complain that it can’t find the rc.exe, otherwise, it will complain that it can’t find the cl.exe.

 

There are two ways to approach the issue as far as setting up the OS environment:

a)      You can either use a batch file that is provided to you by the MS Studio.

b)      Or you can configure the environment variables manually.

There are differences in using method a) versus method b). However, if you understand the implication that comes with the method that you use, you should be able to reach your goal. Those differences will be explained as we go along.

An additional method is to provide all the necessary information in the Paws Studio (CEM options) and give the path for the compilers: cl.exe, rc.exe and link.exe and the paths to the .h and .lib files that come with the MS Studio and are needed at compilation time.

 

Warning: If you make mistakes in the process of changing the environment variables or deleting variables that you should not have deleted, you may compromise the functionality of your Operating System or other software application, which could have otherwise be avoided. Any changes to the environment variables, you will do at your own risk.

It is recommended

·        That you should manipulate the environment variables only if you understand the consequences of each one of the steps you execute.

·        That you read the document from top to bottom in order to understand each step.

Failure to do so will most likely render your computer’s behavior unpredictable.


1         METHOD 1:

The basic objective is to run the batch file provided to you by MS Visual Studio 7.0.

This will do the following:

  • Precede the existing environment variables with the ones needed to use the compiler from outside of the MS Studio.

This means that it will not affect the content of the existing environment variable and will give you the proper environment to compile C/C++ file with Paws Studio.

 

Important Note:

Values for the environment variables are searched from the beginning to the end. That means if you have more than one compiler, using this method will ensure that you are going to use MS Visual Studio 7.0 compilers in your compilation process from Paws Studio.

1.1      Basic method with the batch file:

1.1.1      Batch file name:

The batch file is called vsvars32.bat.

1.1.2      The location for the batch file:

The default location for vsvars32.bat is

C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools

 

Note: If you did not install the Microsoft Visual Studio 7.0 in the default location, you will need to look for it in the folder that you used to install it.

1.1.3      Basic functionality:

  • Run vsvars32.bat from a command window.
  • Verify that the batch file enhanced the environment variables by entering set in the same command window. You can then see the content of the new values for all the environment variables. Note: If you open another command window, you can see that the new window will not take into consideration the new environment variables. In other words, the batch file will affect only the window that ran the batch file and all the exes that are launched from that command window.
  • If you start paws.exe from this command window, those new values will be made available for that process and it will allow for you to successfully build a Paws project with a CEM module, provided however that all the other settings that are needed have been properly configured in Paws Studio for the CEM options, such as the name of the libraries (.lib files) for the Plug and Play drivers you invoke and so forth.

 

Important Note:

If you installed the Microsoft Visual Studio 7.0 in a different folder, the path to the compilers, MS libraries and MS include files will be different and you will have to adjust the content of this document. If you understand the ground rules associated to the compilation process and system environment, this should however not be a problem.

It is recommended however to install the Microsoft Visual Studio in the default location.

1.1.4      Example:

1.1.4.1  Checking on your environment before running the batch file:

  • Open a command window and type set. This will produce the following output. Note:
    1. The output that you get on your computer may differ as a function of the software you have installed which will most likely differ from the computer used in this sample.
    2. Both Paws Studio and Microsoft Visual Studio 7.0 were installed prior to executing this step.

 

 

  • Here is a dump of the screen content for set:

ALLUSERSPROFILE=C:\Documents and Settings\All Users

APPDATA=C:\Documents and Settings\Administrator\Application Data

CommonProgramFiles=C:\Program Files\Common Files

COMPUTERNAME=TESTPC

ComSpec=C:\WINNT\system32\cmd.exe

HOMEDRIVE=C:

HOMEPATH=\

INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\

LIB=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\

LOGONSERVER=\\TESTPC

NUMBER_OF_PROCESSORS=1

OS=Windows_NT

Os2LibPath=C:\WINNT\system32\os2\dll;

Path=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0803

ProgramFiles=C:\Program Files

PROMPT=$P$G

SystemDrive=C:

SystemRoot=C:\WINNT

TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp

TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp

USERDOMAIN=TESTPC

USERNAME=Administrator

USERPROFILE=C:\Documents and Settings\Administrator

VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\"

windir=C:\WINNT

  • Notes:
    1. The content above can be easily obtained by entering set > Ouput.txt where Output.txt is a text file with the name of your choice. This will generate a text file in the local folder.
    2. It is recommended that you should keep an output file with the content of the environment variables. It is also recommended that you identify which variables are associated to the user and which ones to the system. This will allow for you to recover from mistakes that you may make further in the document.

1.1.4.2  Running the Batch file:

  • Open a command window.
  • Move to the default location for the batch file: C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools
  • Run vsvars32.bat as shown below:

 

 

  • If all goes well, you will get the following window:

 

 

 

1.1.4.3  Looking at the environment variables a second time:

  • Entering set at a command line will generate a new output content.

 

 

  • The text version of this output is the following:

ALLUSERSPROFILE=C:\Documents and Settings\All Users

APPDATA=C:\Documents and Settings\Administrator\Application Data

CommonProgramFiles=C:\Program Files\Common Files

COMPUTERNAME=TESTPC

ComSpec=C:\WINNT\system32\cmd.exe

DevEnvDir=C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

FrameworkDir=C:\WINNT\Microsoft.NET\Framework

FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK

FrameworkVersion=v1.0.3705

HOMEDRIVE=C:

HOMEPATH=\

INCLUDE=C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\

LIB=C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\

LOGONSERVER=\\TESTPC

MSVCDir=C:\Program Files\Microsoft Visual Studio .NET\VC7

NUMBER_OF_PROCESSORS=1

OS=Windows_NT

Os2LibPath=C:\WINNT\system32\os2\dll;

Path=C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\bin;C:\WINNT\Microsoft.NET\Framework\v1.0.3705;C:\WINNT\system32;
C:\WINNT;C:\WINNT\System32\Wbem;

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0803

ProgramFiles=C:\Program Files

PROMPT=$P$G

SystemDrive=C:

SystemRoot=C:\WINNT

TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp

TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp

USERDOMAIN=TESTPC

USERNAME=Administrator

USERPROFILE=C:\Documents and Settings\Administrator

VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET

VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\"

VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

windir=C:\WINNT

1.1.4.4  The difference between the two outputs:

The difference between the two outputs is going to be what is of interest to us.

In bold, you have the environment variables which are followed by the values that have been added by the batch file:

 

DevEnvDir = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

 

FrameworkDir = C:\WINNT\Microsoft.NET\Framework

 

FrameworkSDKDir = C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK

 

FrameworkVersion = v1.0.3705

 

INCLUDE = C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\

 

LIB = C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;

 

LIB = C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;

 

MSVCDir = C:\Program Files\Microsoft Visual Studio .NET\VC7

 

Path = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\bin;C:\WINNT\Microsoft.NET\Framework\v1.0.3705;

 

VCINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET

 

VSINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

1.1.4.5  Running Paws:

From that same command window, you need to go to <usr>\tyx\bin, where <usr> is c:\usr by default, and launch Paws.exe. This session of Paws will be able to compile C/C++ files using the Microsoft compiler.

Important Note: If you close that command window and you want to build a Paws project including a CEM module, you will have to repeat the process: Run the batch file from a command window and launch Paws Studio from that command window.


1.2      More advanced method using the batch file:

This method is simply an automated version of the basic method.

 

1.3      Create a batch file:

Simply create and run the batch file named startpaws.bat, in the <usr>\tyx\bin folder containing Paws.exe, where <usr> is the folder where Paws Studio was installed and is C:\usr by default.

 

1.4      Batch file content:

The content of the batch file is the following:

@SET VARSDIR=%VSCOMNTOOLS%

@if "%VARSDIR%"=="" goto Usage

@goto RunCommand

 

:Usage

 

@echo. VSCOMNTOOLS variable of Visual Studio 7.0 install not found

@echo. Please reinstall Visual Studio 7.0

exit

 

:RunCommand

 

@CALL "%VARSDIR%vsvars32.bat"

@CALL "paws.exe"

exit

 

Notes:

  • VSCOMNTOOLS is one of the few environment variables defined during the installation of the Microsoft Visual Studio 7.0.
  • This environment variable can be seen by typing set in a command window as seen in the basic method seen earlier.
  • If you have installed version 7.1, the name of that variable is VS71COMNTOOLS and you will need to adjust the batch file accordingly.

1.5      Final steps:

  • Copy and Paste the above content into the <usr>\tyx\bin\startpaws.bat.
  • Run startpaws.bat by double clicking on it.

This is a batch file which will automatically set the system PATH then it starts Paws.exe application. It will automatically execute what was done manually in the basic method.

 

Note: You will find a dos window remaining in the background after running startpaws.bat. This is due to the fact that the exit command will only be executed after Paws has been closed. You can simply ignore that command window and close it.


2         METHOD 2:

This method will help you configure the environment variables in the system in order to avoid having to deal with batch files.

First we need to identify what environment variables need to be added and then we will go about how to do this.

The environment variables will be set for either

  • the user
  • or the system.

There are issues with adding environment variables in one or the other or both. Let us start with the ground rules:

2.1      Ground rules for the environment variables:

According to Microsoft, the rules are the following:

 

Changing the System Environment Variables

Windows NT requires certain information to find programs, to allocate memory space for some programs to run, and to control various programs. This information — called the system and user environment variables — can be viewed using the System option in Control Panel in the Environment Variables tab. These environment variables are similar to those that can be set in the MS-DOS operating system, such as PATH and TEMP.

The system environment variables are defined by Windows NT Workstation and Windows NT Server and are the same no matter who is logged on at the computer. If you are logged on as a member of the Administrators group, you can add new variables or change the values.

The user environment variables can be different for each user of a particular computer. They include any environment variables you want to define or variables defined by your applications, such as the path where application files are located.

After you change any environment variables in the Environment Variables tab in the System Properties dialog box and click OK, Windows NT saves the new values in the registry so they are available automatically the next time you start your computer.

If any conflict exists between environment variables, Windows NT Workstation and Windows NT Server resolve the conflict in this way:

System environment variables are set first.

User environment variables defined in the System dialog box are set next and override system variables.

Variables defined in Autoexec.bat are set last, but do not override system or environmental variables.

Note Path settings, unlike other environmental variables, are cumulative. The full path (what you see when you type path at the command prompt) is created by appending the path contained in Autoexec.bat to the paths defined in the System option in Control Panel.

 

2.2      What does that mean?

The most important environment variables are PATH, INCLUDE and LIB. Other environment variables are unlikely to be used by another software.

It means that you have to decide whether you want to add the variables for the user or the system.

  • If you add the variables to the user:

o       They will be available to the user alone and not for users that don’t have those environment variables set for them: It has to be done for each and every user that wants to have that available to them.

o       In the event that there is a conflict, it has the advantage that the user that has those environment variables set for them doesn’t care about the values for that variables set in the system, at the exception of PATH.

·        If you add the variables to the system:

o       They will be available for every user.

o       You need to make sure that the user does NOT have the same variables, or the user variable values will overwrite the ones set for the system.

o       That implies that if you install another software that sets user variables for INCLUDE or LIB, it is as if you don’t have anything in INCLUDE and LIB for the system since they get overwritten by the user values for those variables.

o       You need to make sure that no other software will add values for INCLUDE or LIB in the user variables.

o       You will need to delete the INCLUDE and LIB variables for the users so that they do not interfere with the values for those variables in the system.

Warning: You will have to manage any user value for INCLUDE and LIB that you really need to keep for other applications and move those values for those variables in the system variables. Otherwise, you will compromise the functionality of your operating system or other applications.

 

We are now going to go over the steps of adding the proper values to the new environment variables addressed in vsvars32.bat.

2.3      Procedures to follow:

2.3.1      Identifying the values for the new variables:

2.3.1.1  Method 1: using the command window analysis

If we follow the procedure described in the sample for the basic method described above, we will end up by having the following list of new environment variables and values:

 

DevEnvDir = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

 

FrameworkDir = C:\WINNT\Microsoft.NET\Framework

 

FrameworkSDKDir = C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK

 

FrameworkVersion = v1.0.3705

 

INCLUDE = C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\

 

LIB = C:\Program Files\Microsoft Visual Studio .NET\VC7\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\VC7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;

 

MSVCDir = C:\Program Files\Microsoft Visual Studio .NET\VC7

 

PATH = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\bin;C:\WINNT\Microsoft.NET\Framework\v1.0.3705;

 

VCINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET

 

VSINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

 

Those can be directly entered as such for the user or the system.

2.3.1.2  Method 2: using the batch file content

If we look at the content of vsvars32.bat, we will see:

 

@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET

@SET FrameworkDir=C:\WINNT\Microsoft.NET\Framework

@SET FrameworkVersion=v1.0.3705

@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK

@rem Root of Visual Studio common files.

 

@if "%VSINSTALLDIR%"=="" goto Usage

@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%

 

@rem

@rem Root of Visual Studio ide installed files.

@rem

@set DevEnvDir=%VSINSTALLDIR%

 

@rem

@rem Root of Visual C++ installed files.

@rem

@set MSVCDir=%VCINSTALLDIR%\VC7

 

@rem

@echo Setting environment for using Microsoft Visual Studio .NET tools.

@echo (If you also have Visual C++ 6.0 installed and wish to use its tools

@echo from the command line, run vcvars32.bat for Visual C++ 6.0.)

@rem

 

@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.

 

@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;

@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%

@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%

 

@goto end

 

:Usage

 

@echo. VSINSTALLDIR variable is not set.

@echo.

@echo SYNTAX: %0

 

@goto end

 

:end

 

The values for PATH, INCLUDE and LIB use variables as well. This will allow to minimize the number of characters for the value of those variables. It has the advantage that if you want to make changes, you just need to make those changes in one place, mostly to correct any typos.

You can also notice that it will precede the existing values for those variables with the new added values.

 

Important Note: The order of the value is important. Let us say that you have two cl.exe on your system. One from Microsoft and one from National Instrument, in the PATH variable, the first cl.exe that is found in the order specified in the value will be the one that will be used. With the method used in the batch file above, it is guarantied to find the Microsoft cl.exe (compiler for c/c++) first.

 

2.3.2      Adding the new variables and the new values:

We will go through the exercise of adding the new values and the new variables to the system, making sure that we will use the Microsoft compilers, header files and libraries before any other files and compilers from another software.

If you wish to deviate from this exercise, you should have enough information to achieve your specific requirements. For additional information, please refer to documentation that can be found on the internet related to environment variables.

 

Important note: Not entering the values, such as paths, in a proper format, will result in the system ignoring the end of the value that you have entered, which is the same as if you had not entered it.

2.3.3      Accessing the window to add environment variables

 

·        From the Control Panel, open System.

 

 

·        Go to the Advanced tab as shown below and click on Environment Variables…

 

 

·        This will give you access to the following window:

 

·        As you can tell, after installing Microsoft Visual Studio 7.0, you have variables INCLUDE and LIB for both the system and the users. It turns out that they have respectively the same values in both.

·        We will first add the new variables and their values and then we will proceed in deleting INCLUDE and LIB for the user so that their value won’t interfere with what we added in the system.

2.3.3.1  Adding new values:

·        The new values we want to add are going to be extracted from Method 1: using the command window analysis

 

DevEnvDir = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

 

FrameworkDir = C:\WINNT\Microsoft.NET\Framework

 

FrameworkSDKDir = C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK

 

FrameworkVersion = v1.0.3705

 

MSVCDir = C:\Program Files\Microsoft Visual Studio .NET\VC7

 

VCINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET

 

VSINSTALLDIR = C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE

 

·        Let’s go over one of them:

o       In the window above, you need to click on New… for the system variables.

o       You need to enter the variable name and the value described above after the = sign as can be seen below for DevEnvDir

 

 

o       Click on OK and you’ll see that the new variable has been added with its new value

 

 

Note: Please note that those windows will not show the whole content of the value, so please don’t use those pictures to determine what needs to be entered because it will be incomplete. For this, you need to refer to the methods described above.

2.3.3.2  Adding values to existing variables

This will be the case for PATH, INCLUDE and LIB.

 

Rather than pressing New…, we will select each one of those variables one by one and press Edit…

 

·        The list of values we will want to add will be extracted from the batch file vsvars32.bat:

 

PATH = %DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;

 

INCLUDE = %MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;

 

LIB = %MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;

 

·         Those values will precede the existing value for those variables. Please note the semicolon that has to separate the new value from the old one. Without it, you would not end up with a properly formatted value.

·         For example, for PATH, once you have pressed Edit… you will have the following window:

 

 

·         You need to add the new path for the variable listed above, at the beginning of the value as seen below. In the image below, you can see the end of the new path for the value and the beginning of the old one, both of them separated by a semicolon

 

 

2.3.3.3  Deleting the INCLUDE and LIB variables at the user level:

 

·         You need to select LIB and INCLUDE for the user variables

 

 

·        And press Delete for each one of them.

Warning: This assumes that there is no value in INCLUDE or LIB that is not already in the system variables. In this case, you are only deleting redundant information. Any other value associated to INCLUDE and/or LIB, that is NOT in the system variables will need to be moved to the corresponding system variables. Failure to do this will compromise the functionality of your operating system or the functionality of other software applications.

Note: Do not delete any other user environment variables. If you do, you will have to know the exact consequence of your actions. You can recover from deleting variables by mistake by referring to the output files that you were recommended to generate earlier in the document before making any changes to the environment variables.

·        Press OK on this window and then on the following one:

 

2.3.3.4  Trying it out

You are now ready to check out that you have done a good job.

·        You need to open a new command window.

·        Type set.

·        You should see all the new values and the new variables as such:

 

 

If you do not see them, then you have made a mistake and you need to start over again.

 

In case of a problem:

·        Make sure that you entered the proper value for each system variables.

·        Make sure that the new variables precede the old one.

·        Make sure that the old value and the new ones are separated by a semicolon.

·        Make sure that INCLUDE and LIB are deleted for the user.

 

If you are successful and you have all the new variables and all the new values, you are done. All new variables and values should be available for all users provided that:

·        No other user has INCLUDE and LIB defined at the user level.

·        That no other software is going to add values to INCLUDE and LIB at the user level.

 

You are now ready to build Paws with a simple CEM with the following settings:

 

 

 


3         METHOD 3:

  • Although it is possible to add the path for INCLUDE, LIB and for the compilers with MSVC++6.0 in the CEM options of the Paws Studio and build a project from Paws Studio that includes a CEM module, it is not possible to do so using MSVC++7.0.