Author Topic: Building xLights  (Read 3910 times)

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Building xLights
« on: September 28, 2016, 08:06:25 AM »
What did I do wrong? I followed the instructions on the Readme.windows from GitHub for Visual Studio. I'm running VS 2015 professional. Placed the xLights code and wxWidgets in the same base directory. Build DLL Debug and DLL Release of wxWidgets in VS with no errors. Opened the xlights solution but when I attempt to build it, I get 244 errors relating to header files. See attached image for some of the errors.

Jennifer Wylie

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Building xLights
« Reply #1 on: September 28, 2016, 08:14:59 AM »
Personally I don't like using Visual Studio for a Windows version of xLights.  Sean and I use CodeBlocks.  The instructions for using Visual Studio require you to have the same relative directory structure that Keith used when he created the instructions.  I got the code to build in Visual Studio before but I didn't like it at all.  The compile seems slower and it leaves a ton of garbage build artifacts lying around that you have to know not to sync into the repository.  There are also tons of warnings when building in VS that you don't get when using CodeBlocks.

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #2 on: September 28, 2016, 08:25:44 AM »
Guess I'll give Code Blocks a try then. Was just hoping to use the tools I already have and that I'm already familiar with.
Jennifer Wylie

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Building xLights
« Reply #3 on: September 28, 2016, 08:35:12 AM »
Just try to follow the instructions closely.  I've even messed it up a couple times by missing something.  One thing is don't try to use the compiler that comes with CodeBlocks because we are using a newer version.  Also it's possible the link for the compiler might be hard to find.  Last person I helped ended up using a newer version.  I think it worked but it's not the official compiler version we were all using.  There is one step where you have to edit a wxWidgets file and you need to close out any application that you were using to edit the file or it can hold a lock on the file and cause the compile to fail.

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #4 on: September 28, 2016, 09:06:04 AM »
This is what I get for trying to take advantage of a slow day at work. So I removed wxWidgets from where it was and reintalled.  Got to step 7 of the readme and Error. Ugh
Jennifer Wylie

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #5 on: September 28, 2016, 09:10:08 AM »
One thing to note is I had to change the path in step 3 to this:

SET Path=C:\Windows\system32;C:\Windows;C:\Program Files (x86)\mingw-w64\i686-6.2.0-posix-dwarf-rt_v5-rev1\mingw32\bin
Jennifer Wylie

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Building xLights
« Reply #6 on: September 28, 2016, 10:46:48 AM »
Well we are using version 5.3 of mingw.  Looks like you installed 6.2.  The setup.h files are created as part of the build process for wxWidgets.  The error you are getting looks like what happened to me when I didn't close out Notepad after editing the graphics context symbol.  I ended up having to fully delete the entire wxWidgets directory to fix it.

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #7 on: September 28, 2016, 11:26:57 AM »
Okay I'll get the older version of mingw and try that.

As far as the wxWidgets, I made that change in VS since that's my default program. While i did shut it down after the edits I'm wondering if some of the other tools I use that are in both VS and SQL Server messed with it.
Jennifer Wylie

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #8 on: September 28, 2016, 12:08:01 PM »
So I feel like a complete dumb ass for this one. The build failed because I had file explorer open. as soon as i closed that, it worked fine. ugh. I really hate windows sometimes.
Jennifer Wylie

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Building xLights
« Reply #9 on: September 28, 2016, 12:36:51 PM »
Well I wouldn't have known to try to warn you about it if I hadn't done the same thing at least 3 times.

Offline jnealand

  • Hero Member
  • *****
  • Posts: 1421
    • View Profile
Re: Building xLights
« Reply #10 on: September 28, 2016, 02:48:04 PM »
And why not just use the download version of the install program?  Nice to know how to build the system, but there is a lot of other work to be done in getting the light show done.  I'm all for learning, but I'm also for optimizing my time.  Don't ask me how many times I missed my self imposed deadline because of trying to go the hard way instead of the easy way.  I may not be able to count that high.
Jim Nealand
Kennesaw, GA

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Building xLights
« Reply #11 on: September 28, 2016, 03:06:14 PM »
She is going to add content to the program Jim.  If you weren't anti-Facebook you would know that.

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #12 on: September 29, 2016, 09:35:40 AM »
So today's mystery. When I load the project in Code::Blocks the Global Variable Editor comes up with the Current Variable of wxvc. I never set that, just wx like the instructions. I've tried deleting it but it comes right back.
Jennifer Wylie

Offline jwylie01

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Building xLights
« Reply #13 on: September 29, 2016, 09:47:45 AM »
And why not just use the download version of the install program?  Nice to know how to build the system, but there is a lot of other work to be done in getting the light show done.  I'm all for learning, but I'm also for optimizing my time.  Don't ask me how many times I missed my self imposed deadline because of trying to go the hard way instead of the easy way.  I may not be able to count that high.

Jim,  I want to add a mega tree calculator to the tools in xLights. Someone mentioned they would like to have one that considers the top of the tree instead of just using a pointed cone and being the type of person I am, I started coding one. Gil then mentioned I should just add it to the tools in xLights instead of having it as a stand alone program so that's what I'm up to.
Jennifer Wylie

Offline jnealand

  • Hero Member
  • *****
  • Posts: 1421
    • View Profile
Re: Building xLights
« Reply #14 on: September 29, 2016, 03:04:38 PM »
When I was 40 years younger I probably would have liked to do some of this, but now being 10 years past retirement, just keeping up xlights releases and building stuff is a big enough challenge.  Good luck with your work.
Jim Nealand
Kennesaw, GA