Build OF from source + generating projects in VS2017

#1

Hi folks,
I’ve been trying to build OF from source on windows for the 1st time, and I’m trying to better understand the exact steps I need to follow.

Here is what I’ve been doing:

  1. Clone from repo in visual studio.
    2)Open scripts/vs
  2. run download_libs.ps1 in powershell
    4)build and run the emptyExample project to validate everything is working so far.

at this point, OF itself is working. However, I also want to build the example projects for visual studio.
If I run compileAllExamples.cmd I get a few lines of feedback, but it doesn’t build anything.

Maybe I need to build the projectGenerator 1st? I open the commandLine.sln for the project generator and build that. It compiles succesfully, but the compileAllExamples.cmd script still doesn’t work. Does the built commandLine generator need to be put into a specific location?

If I copy over the ‘projectGenerator-vs’ and try to run it once, it works, and from that point forward, the `compileAllExamples.cmd will now run properly and will compile all of the examples.

What am i missing in these steps? I would like to be able to build the examples from the script without needing to copy over a pre-built project generator.

#2

Hi, you need to create the VS projects with the project generator. Take a look at the readmes inside the projectGenerator folder.
take a look in scripts/dev/create_package.sh and there you can see both, how the PG is built and creating the VS project files for the examples.
Long story short, it is easier to use the already compiled PG.
hope this helps

#3

thanks! I think this one is one of those ‘more trouble than its worth’ scenarios. I may stick to just using the already compiled project generator for now.