Author Topic: Compiling nutcracker/xlights  (Read 3676 times)

Offline darylc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Compiling nutcracker/xlights
« on: November 08, 2014, 09:55:09 PM »
Hi,

I'm interested in contributing to the codebase and have been trying to get it to compile.  I followed the MS Visual C++ instructions from https://github.com/smeighan/xLights/blob/master/README.windows

but am getting these errors:
||=== Build: MSVC_Debug in xLights (compiler: Microsoft Visual C++ 2010) ===|
c:\xlights-opengl2\xlights\SequencePreview.h|40|error C2864: 'SequencePreview::mIsDrawing' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\SequencePreview.h|41|error C2864: 'SequencePreview::mIsInitialized' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|52|error C2864: 'ModelPreview::mIsDrawing' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|53|error C2864: 'ModelPreview::mIsInitialized' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|54|error C2864: 'ModelPreview::mBackgroundImageExists' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|56|error C2864: 'ModelPreview::mBackgroundBrightness' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|57|error C2864: 'ModelPreview::mPointSize' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelPreview.h|60|error C2864: 'ModelPreview::image' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelClass.h|280|error C2864: 'ModelClass::Selected' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\ModelClass.h|281|error C2864: 'ModelClass::GroupSelected' : only static const integral data members can be initialized within a class|
c:\xlights-opengl2\xlights\xLightsMain.h|1255|error C2864: 'xLightsFrame::mPointSize' : only static const integral data members can be initialized within a class|
||=== Build failed: 11 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|


Does anyone have any suggestions?

Also is there a developer forum or mailing list etc I can join?

Thanks,
Daryl

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #1 on: November 08, 2014, 11:17:16 PM »
I am not using mxvc, I use mingw. We were setting up mxvc last feb before Matt left. Mingw has been the main compiler since 2013
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline darylc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Compiling nutcracker/xlights
« Reply #2 on: November 09, 2014, 12:45:55 AM »
Thanks Sean - am using mingw now.  I gather I need to download some opengl stuff - any pointers?

||=== Build: MinGW_Release in xLights (compiler: GNU GCC Compiler) ===|
.objs\Image.o:Image.cpp|| undefined reference to `glDeleteTextures@8'|
.objs\Image_Loader.o:Image_Loader.cpp|| undefined reference to `glGenTextures@8'|
.objs\Image_Loader.o:Image_Loader.cpp|| undefined reference to `glBindTexture@8'|

Daryl

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
    • WinterLightShow in Georgetown, TX
Re: Compiling nutcracker/xlights
« Reply #3 on: November 09, 2014, 08:37:22 AM »
daryl,

can you document the tools and steps you take to setup the environment and produce a build?
if there are existing docs, can you update them to provide missing/useful info?

once i get my show up and going, I'd also like to help.

thanks!
http://WinterLightShow.com  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Compiling nutcracker/xlights
« Reply #4 on: November 09, 2014, 09:35:25 AM »

There is a README.windows in the directory that SHOULD have all the information.  I'm not sure how updated it is.   The OSX README is up to date as I just went through it when I installed OSX from scratch a few weeks ago so I verified it all.

Definitely submit any updates for the README's.  They are helpful.
Daniel Kulp
Framingham, MA

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #5 on: November 09, 2014, 12:23:56 PM »
if you are on windows read the README.windows file.
This take syou through setup.

You need to download wxwidgets. This also comes with mingw precompiled for you

you need to download codeblocks.

For Windows;
you need to do some setup in the compiler tab of codeblocks.

you then open the xlights project files that is in xlights subdirectory. This project file is for codeblocks.
You then should be able to press F9 and have it compile and link
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline darylc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Compiling nutcracker/xlights
« Reply #6 on: November 09, 2014, 01:39:00 PM »
Hi Guys,

I have been following README.windows and intend to contribute an update if I manage to get it to work :)

I was wondering if these instructions need updating now that we're using OpenGL as I seem to be getting errors related to that.

Daryl

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #7 on: November 09, 2014, 02:11:16 PM »
Yes, there are two libraries that you add in to the. Linker section. I'll do a screen shot later. Also u need glut32.dll. I think I checked it in so that the windows code can work. U might look at the xlights_opengl.iss Inno setup file. This file is what builds the distribution. It shows files we use.
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline darylc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Compiling nutcracker/xlights
« Reply #8 on: November 09, 2014, 02:41:27 PM »
Getting closer.

Do you need to compile wxwidgets differently for opengl?

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #9 on: November 09, 2014, 02:42:21 PM »
Nope. All I did was add some libraries in the linker section.
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #10 on: November 09, 2014, 03:32:30 PM »
here were the settings in the linker tab.
"Settings, Compiler, Linker"


[attachment deleted by admin]
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62

Offline darylc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Compiling nutcracker/xlights
« Reply #11 on: November 10, 2014, 04:52:56 AM »
Got it working, thanks for your help Sean.

Updated README.windows and sent you a pull request :)

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
Re: Compiling nutcracker/xlights
« Reply #12 on: November 10, 2014, 10:59:43 AM »
thanks dayl!
i pulled your changes into the master branch.
Sean
Littleton, CO
Latest releases http://nutcracker123.com/nutcracker/releases
xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php
Fbook [url=https://www.facebook.com/groups/62