Author Topic: Anyone have a xLights/Nutcracker working development platform? **Solved**  (Read 2689 times)

Offline johnty

  • Newbie
  • *
  • Posts: 46
    • View Profile
I've been watching the developer tutorial videos Sean made last summer, downloaded the xLights software from GitHub, installed CodeBlocks, MinGW, wxWidgets 3.0.0, and followed directions in the Windows Readme to create the DLLs, setup CodeBlocks, etc.

Two main problems -

1) running the mingw32-make -f makefile.gcc compiles for awhile then ends with an Error 1 condition on both debug and release versions.

2)  Compiling a wxPanel in CodeBlocks terminates with an error while processing a 'winundef.h' file, possibly due to 1), above.

My CodeBlock Global and Complier settings match everything in the video but there are differences in the xLights-master file on GitHub and in the current Readme files from those shown on the video.

If anybody is successfully creating Nutcracker effects with this developer's platform I'd like to review how things are set up to see where I've gone wrong.

John
« Last Edit: February 11, 2014, 03:59:18 AM by johnty »

Offline sean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1727
    • View Profile
    • Xlights and Nutcracker Forum
what platform are you setting up? windows, linux or mac?

i use windows 8.
i have codeblocks 13.12
wxwidgets 3.0.0

 i followed steps in README.windows

Here are the steps to compile xLights/Nutcracker for Windows.

  a) Install Code::Blocks for Windows (currently using version 12.11)

     Download and install the codeblocks-12.11mingw-setup_user.exe file from here:
        http://www.codeblocks.org/downloads
     This includes Code::Blocks and the GNU C++ compiler needed for building xLights.

  c) wxWidgets for Windows (currently using version 3.0.0)

     Download the version with the Windows installer from here:
        http://www.wxwidgets.org/downloads/
     The installer only puts the wxWidgets source code on your system, you will need
     to compile it yourself to create the dll. To compile it yourself:

     1) Open a command prompt
     2) cd to the build\msw directory under your wxWidgets base directory
     3) Some users have reported that their path variable was too long, which confused the wx buld.
        If so, try: SET Path=C:\Windows\system32;C:\Windows;C:\mingw\bin
     4) run: mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 CXXFLAGS="-std=gnu++0x" BUILD=debug
        (last changed 7 SEPT 2013)
     5) run: mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 CXXFLAGS="-std=gnu++0x" BUILD=release
        (last changed 7 SEPT 2013)
     6) If you downloaded the zip or 7z version of wxWidgets instead of the Windows installer version,
        then you need to update your path environment variable to include C:\wxWidgets-3.0.0\lib\gcc_dll
        (assuming C:\wxWidgets-3.0.0 is your wxWidgets base directory).

  d) In Code::Blocks:
     1) select Settings > Compiler
     2) click Search Directories tab
     3) Under Compiler sub-tab should be:
          $(#wx)\include
          $(#wx)\contrib\include
     4) Under Linker sub-tab should be:
          $(#wx)\lib\gcc_dll
     5) Make sure "wx" is defined under Settings > Global Variables
        as described in the Code::Blocks documentation. It should be
        set to your wxWidgets base directory. Just the "Base" field
        needs to be filled in - to something like "C:\wxWidgets-3.0.0",
        assuming that is where your copy of wxWidgets is located.

  e) Now you are ready to use Code::Blocks to build xLights
     by double-clicking on the cbp file in the version2/xLights directory.


you do need to configure the paths. but after all of that, i can build a new binary.
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 johnty

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Anyone have a xLights/Nutcracker working development platform **Solved**
« Reply #2 on: February 11, 2014, 03:58:51 AM »

  a) Install Code::Blocks for Windows (currently using version 12.11)

     Download and install the codeblocks-12.11mingw-setup_user.exe file from here:
        http://www.codeblocks.org/downloads
     This includes Code::Blocks and the GNU C++ compiler needed for building xLights.


Sean,

This was the problem.  Earlier versions of the README had the mingw-setup being downloaded from the MinGW site instead of Code::Blocks.  Deleted everything and started over.  This time the mingw32-make ran to normal conclusion.  Things work much better!

Thanks,
 John