I can compile all examples in the CONNECT SDK in the developer shell. Now I am trying to open the solutions in Visual Studio 2019 and compile inside VS.
I made a copy of MicroStationDeveloperShell.bat and added this line at the end so Visual Studio would open:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe"
When I open MyApp.sln and try to compile, I get this output:
Rebuild All started: Project: MyApp, Configuration: Debug Win32 ------1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(50,5): warning MSB8005: The property 'NMakeReBuildCommandLine' doesn't exist. Skipping...1>Done building project "MyApp.vcxproj".========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I know in SS3, had to create a solution and manually add the build Command Line in the NMake property.
Since the CONNECT examples already have solution files, I assumed this would not be necessary. Am I missing something?
As a test, manually added the build Command Line and added the mdl\include path in hte Include Directors.
But this only got me so far. It is producing the mdlapps.ma file but not mdlapps.dll and I am getting many compile errors.
Ken Adams said:I can compile all examples in the CONNECT SDK in the developer shell. Now I am trying to open the solutions in Visual Studio 2019
Examine the folder that contains each SDK example. Most have file openSln.bat. When you run that batch file from the SDK command window, it starts the Viz Studio solution (e.g. myapp.sln) with the SDK environment defined, so that Viz Studio can find the necessary header and library files.
openSln.bat
myapp.sln
Regards, Jon Summers LA Solutions
That worked with a few adjustments. I had to change vs120comntoools to vs160comntools, and for myapp, I still needed to add the bmake command line and include folder. But after that is compiles perfectly. Thank you.