OS. Start Your C++ Project
This quick set of steps demonstrates how to set up your workspace for a C++ project.
This procedure is adapted from a
similar tutorial at https://docs.microsoft.com/en-us/cpp/build/vscpp-step-1-create.
- In the Visual Studio start window, click Create a new project. The Create a new project window opens.
-
Filter the project templates using the following:
- Type console in the search field.
- Select C++ from the Language drop-down list.
- Select Windows from the Platform drop-down list.
- Select the Console App from the results and then click Next. The Configure your new project window opens.
- Type OpenSTAAD Demo in the Project Name field.
- Click Create. Visual Studio opens your new project, which includes default "Hello World" code.
-
Add the staadpro.dll dependency to the project file:
This adds OpenSTAAD as a COM file reference.
- Open the project's .vcxproj file.
-
Add the following element to the start of the
ItemGroup element:
<COMFileReference Include="C:\Program Files\Bentley\Engineering\STAAD.Pro CONNECT Edition\STAAD\StaadPro.dll"> <EmbedInteropTypes>True</EmbedInteropTypes> </COMFileReference>
- Save and close the project file.