Shop OBEX P1 Docs P2 Docs Learn Events
How to use PropGCC under Windows — Parallax Forums

How to use PropGCC under Windows

I've always been either a Mac or Linux user of PropGCC and am trying to get it working under Windows now. I downloaded one of the builds from TeamCity and installed it. The first problem I ran into was needing libwinpthread-1.dll. I found a copy of that and installed it and now propeller-elf-gcc will run. However, I still need make to build my project. So I have two questions:

1) Where is the official source for libwinpthread-1.dll? My scrounged copy may not be compatible with PropGCC so I'd rather install this from the official source.

2) What version of make are people using? I could install Cygwin and use that but I'd like to know if there is a better alternative. As you probably guessed, I'm not using SimpleIDE.

Thanks,
David

Comments

  • I've also noticed that openspin.exe from TeamCity fails to run. It looks like it needs some library that isn't present. Is there a README somewhere that describes how to put together a working Windows system from what is on TeamCity? I installed Cygwin to get make and that seems to work but I'm now stuck on openspin.
  • I never ran into the libwinpthread-1.dll issue, but that kind of Smile and lack of Make is why I just gave up supporting PropWare on Windows (haven't tested any Parallax products on Windows for a year or two now). I know that's 95% of the users on these forums, which makes PropWare darned near useless, but the Windows environment is just darned near impossible to work with for any application that was intended to be invoked on the command line. I'd strongly encourage you to just go back to "Linux" via WSL if that's an option for you. Or find someone who actually knows Windows way better than me. I get fed up with it in a heartbeat...

    Interesting that openspin.exe isn't working either. When built with MinGW, it's not even linking against any shared libs:
    i686-w64-mingw32-g++ -o ./build-win32/openspin.exe -Wall -g -static ./build-win32/openspin.o ./build-win32/pathentry.o ./build-win32/PropellerCompiler/libopenspin.a
    
    (http://david.zemon.name:8111/viewLog.html?buildId=1833&buildTypeId=OpenSpin_WindowsX86&tab=buildLog&_focus=113&guest=1#_state=70)
  • I don't really *need* to use Windows. It's just that the machine that was next to my workbench is running it. Maybe I should just wipe it and install Linux. However, it would be really nice to have a Windows distribution of the command line tools that just works and doesn't require installing lots of other junk like Cygwin. I think jazzed once had the required utilities built statically so they could be included in a distribution but I'm not sure what happened to those utilities.
  • Heater.Heater. Posts: 21,230
    If you have Windows 10 then install the Linux Subsystem for Windows. In there you can use all the comfort of a Linux distribution to work in. The LSW now supports a variety of distros. I have one with Ubuntu and one with Debian.

    My cygwin installation has seen very little use since the LSW became available. It's about to get deleted as space is getting tight on this machine and reclaiming 11GB would be useful.

  • I had forgotten about LSW. That is a good option for me. However, I still think we need a working Windows install that doesn't require LSW.
  • Dave HeinDave Hein Posts: 6,347
    edited 2018-06-28 00:47
    I have SimpleIDE installed on my Windows system, but I usually run the PropGCC utilities from the command line. They should work in a command-line window, but I rarely use that. I normally run in a Cygwin window. I also use minGW, especially when I want to build a Windows executable to distribute to others. minGW executables don't require special DLLs except for those provided by Microsoft. Cygwin executables aren't self-contained, and they do require Cygwin DLLs. That's why Steve switched to building the Windows executables under minGW.


    I didn't know about the libwinpthread-1.dll file, but a search of my system shows that I have 4 copies. One of them is in the SimpleIDE/bin directory. Presumably, it was put there when I installed SimpleIDE. Another is contained with an open source genealogy program called Gramps. The third one is contained in a Git/minGW directory that I installed from GitHub. The fourth one is in a directory called McSimulator. I have no idea what that is.


    All 4 of the DLLs is a different size, so clearly they are different versions of the libwinpthread-1 DLL.
  • Is there anyone here who is able to run openspin.exe under Windows? What libraries did you have to install along with it? I have PropGCC working now but openspin doesn't work.
  • David Betz wrote: »
    I had forgotten about LSW. That is a good option for me. However, I still think we need a working Windows install that doesn't require LSW.
    Actually, LSW won't work for me because the Windows machine I want to use is running Windows 7. I guess I'm back to trying to get openspin.exe to work.
  • I've never used openspin, but I downloaded the source from github.com/parallaxinc/OpenSpin and built it under both Cygwin and minGW. I was able to compile and build a simple "Hello World" program using FullDuplexSerial. They both produced binary files that were identical to the binary produced by the Spin tool.


    I've attached the openspin.exe that I built under minGW.
  • Dave Hein wrote: »
    I've never used openspin, but I downloaded the source from github.com/parallaxinc/OpenSpin and built it under both Cygwin and minGW. I was able to compile and build a simple "Hello World" program using FullDuplexSerial. They both produced binary files that were identical to the binary produced by the Spin tool.


    I've attached the openspin.exe that I built under minGW.
    Thanks but that doesn't work on my system because it requires libgcc_s_dw2-1.dll.

  • OK, could you try this version? I added the -static-libgcc -static-libstdc++ options to the makefile.
  • Dave Hein wrote: »
    OK, could you try this version? I added the -static-libgcc -static-libstdc++ options to the makefile.
    That did it. Thanks!

  • Dave Hein wrote: »
    OK, could you try this version? I added the -static-libgcc -static-libstdc++ options to the makefile.

    Looking through the Makefile, I didn't see any way to add those flags without modifying the source (as in, no environment variables that could be configured). Did you modify the Makefile? If there's an environment variable, I'll set that in TeamCity, otherwise it will have to wait for a PR to be submitted and merged.
  • I added it to the CFLAGS+=… lines in the top Makefile. I noticed that the non-Darwin case uses an MSTATIC environment variable. Maybe that's the way the static lib options are supposed to be defined. The makefile says it was copied from Eric's spin2cpp makefile. Maybe there is a comment in the spin2cpp project about using static libraries.
Sign In or Register to comment.