These are some things I learnt when trying to use Open Inventor for the first time. The basic reference is the installation guide for LHC++ which contains details relevant to use of all LHC++ components. It can be found at:
Z:\P32\lhcxx\specific\windows_NT\Hepexplorer\dev\install\install_NT.txt
The following are tips that may help interpret the instructions contained in the above file. After doing the following I was able to compile, link and run my own Open Inventor application. My example was developed using Visual C++ V5.
1) Firstly the environment has to be setup and to do this you should install the setup
batch file by running the program
Z:/P32/lhcxx/specific/windows_NT/Hepexplorer/dev/install/preinstall.exe.
This will install some shortcuts in the LHC++ Folder on your Start Menu and will also copy the setup script (hepexp.bat) into your profiles directory, which is normally found in c:/wnt/profiles/your_name/hepexp.bat. This file must be edited to set some environment variables correctly as follows : (see also this example that worked for me)
i) To set the environment variable MsDevDir correctly, comment and uncomment the relevant lines to read as follows :
REM Visual C++: if MsDevDir is not defined, try the
most likely location
if "%MsDevDir%" == "" set MsDevDir=c:\program files\devstudio
REM -- If MsDevDir points to DevStudio directory, use these settings --
set
include=%MsDevDir%\vc\include;%MsDevDir%\vc\atl\include;%MsDevDir%\vc\mfc\include;%include%
set lib=%MsDevDir%\vc\lib;%lib%
set path=%MsDevDir%\vc\bin;%MsDevDir%\SharedIDE\bin;%PATH%
REM -- If MsDevDir ends in SharedIDE directory, use these settings --
REM set
include=%MsDevDir%\..\vc\include;%MsDevDir%\..\vc\atl\include;%MsDevDir%\..\vc\mfc\include;%include%
REM set lib=%MsDevDir%\..\vc\lib;%lib%
REM set path=%MsDevDir%\..\vc\bin;%MsDevDir%\..\SharedIDE\bin;%PATH%
ii) You must then set the following variable up : set EXPLORERUSERHOME=h:\harvey\explorer
iii) If you do not want to use Objectivity then add the following line : set NO_INSTALL_HISTODB=1
You must also check the environment variables specified in the System utility reached from the Control Panel.
From Start menu select Settings/Control Panel/System
In the User variables window set the following
Variable
Value
Path
add to path ;Z:\P32\lhcxx\specific\windows_NT\OpenInventor\2.4.0\Program
MsDevDir
P:/DevStudio97
TGS_LICENSE_FILE
z:/p32/lhcxx/specific/windows_NT/OpenInventor/2.4.0/license/password.dat
Run Z:/P32/lhcxx/specific/windows_NT/Hepexplorer/dev/install/f_inst
To be able and compile and link using the standard Open Inventor header files and
libraries the relevant directories must be specified. From Developer Studio, select
Tools/Options and then click on the directories tab.
Select Include files from the "Show directories for" tab and add
Z:/P32/lhcxx/specific/windows_NT/OpenInventor/2.4.0/include
Slect Library Files from the same tab and add Z:\P32\lhcxx\specific\windows_NT\OpenInventor\2.4.0\lib
I have made an example taken from the Inventor Mentor reference book that I was able to
build and run successfully :
see S:\LHCb\Software\Hellocone