programming and running crystal on windows - crystal-lang

I need to work with crystal on windows. Does anyone know about an environment for windows?
And how to I run the files I wrote - if for example for now I'm writing in notepad?
thank you!

In the wiki, there is a guide on working with Crystal on Windows: https://github.com/crystal-lang/crystal/wiki/Porting-to-Windows
However, Windows support is very limited for now, but it's taken some steps lately.
The ongoing efforts for porting to Windows are tracked in https://github.com/crystal-lang/crystal/issues/5430 As you can see, many basic features are still pending. Right now, you probably will not be able to compile any useful program on Windows.
But you can very easily develop on Windows in a Linux environment using Windows Subsystem for Linux. Instructions are in the docs: https://crystal-lang.org/docs/installation/on_bash_on_ubuntu_on_windows.html

Related

Cross compilation - V8 and Linux on Windows

I am trying to embed Google's V8 in my game engine. I'm targeting 3 operating systems: Windows, Linux and OS X.
I haven't had any problems with building for Windows - I used NuGet packages. But I'm trying to build V8 for Linux and the problem is - I'm doing this on Windows (Windows 10 if it matters).
Google doesn't exactly say how to compile V8 for Linux using Windows and now I'm really confused, as I have no idea. So far I have depot_tools, properly fetched v8 (using fetch command), Python and MinGW.
I've tried with v8gen.py, but it seems that it generates build files only for Visual Studio. As I said, I don't need VS files.
My question is: What should I do?
This is not possible out-of-the-box with the current build tools and configurations that V8 provides. As suggested in the comments, using a VM might be the quickest way to get this working for you.
If it is very important for you long-term, or for other developers as well, you could look at submitting patches to V8 to make this possible, but I don't have a good sense of how much work that would be.

SDL - Cross platform development

I'm going to enter a small game competition in the coming months. They require the submission to be able to be compiled ( and it will be, before being run/evaluated for the contest) on Linux. I'm going to be using SDL and C++. I've only ever developed on Windows before and I've grown quite accustomed to the benefits Visual Studio gives. I'd like to be able to develop in windows with VS, and then near the end of the process migrate it over to linux. Beside making sure SDL is already installed on the Linux machine, are there things I can do throughout development that will make the process easier? Also, the contest rule for all of this states:
it must also work on an open platform (we strongly recommend making sure that your program run on modern flavors of GNU/Linux, as all of the judges will have access to it).
I assume compiling/running in Ubuntu (already have a home server with this) would be sufficient for this?
Your question is slightly open-ended, but my first suggestion would be to use a proper cross-platform build system such as CMake from day one. I would refrain from "migrating" to Linux at the very end; you may be under a rough schedule (and maybe run into problems you did not anticipate). Thus, a continuous build of (working) Linux versions will help ease your worries.
Furthermore, if the game is meant to run solely under Linux, why not install Ubuntu in a Virtual Machine somewhere and get acquainted with one of the development environments such as kdevelop or qtcreator? Wouldn't direct contact with the platform you are developing for make things a little easier?
I'm developing games and started like you. I'd advise you to use SFML library for this purposes. It's not very big and is very good thing to start from.
There you can use:
2D renderer (OpenGL)
Fonts
Timers
Wrappers around images/sprites
Post effects/shaders
Sound
Network
In this page you can find a few start examples.

What are some ways that I can develop C++ apps in Linux from a Windows workstation?

I'm developing C++ apps for Linux, but my workstation is Windows 7. I've read that Visual Studio is the strongest C++ IDE for Windows, but I actually want to execute the code on Ubuntu and be able to use a more graphically pleasing debugger than gdb, although the functionality of gdb is pretty good. I'm really happy with valgrind as well, but again, I'd like to be able to leverage that in an IDE in windows.
I currently use QtCreator as my C++ IDE and I edit the files over a samba mount to the linux box. I use Putty to run the Linux commands. I use git as my source control system, gcc as my compiler and cmake as my build system. I like QtCreator, but as I have it configured, I'm not taking advantage of code-completion or debugging.
The closest thing I've seen is CodeWarrior. It allows for executing code on remote embedded systems and a full debugger. Has anyone ever used this for general app development on Ubuntu?
Is QtCreator the right IDE for me? Is there something else that I can do to configure it so that it'll give me those rich IDE features that I'm looking for? Or should I look to another IDE? Also, are there some tools that I've neglected to mention that would make C++ development easier on a Linux box from a Windows workstation?
Thanks in advance...
It is not clear, you run QtCreator on windows?
If so, you can run QtCreator in Linux,
plus install nxserver on Linux,
and nxclient on windows (http://www.nomachine.com/).
So you run nxclient on windows, login to linux,
and work on linux, in compare with virtual machines,
you get more prefomance.
Use VirtualBox and linux virtual machines?
X Windows.
You could install Cygwin to run an X11 server on your Windows 7 desktop, then run an X11 graphical IDE like QtCreator on your Linux server that renders directly to your Cygwin Windows 7 desktop. I actually tried setting this up with Code::Blocks on openSUSE and Cygwin on Windows 7 just a few weeks ago because I'm in the same situation you're in. It works... kind of. There are weird intermittent errors.
Your scenario is exactly the scenario that the X Windows system was designed for, and it is awesome in concept, but the actual X11 protocol design and implementation is, I gather, old and pretty hairy. I have very little experience with X, but the people who do have lots of experience with it seem to complain about it a lot, and I suppose there are good reasons for that. Too bad, because it would be wonderful if there were a technology like X Windows that worked. AJAX is basically a cheap hack for solving the same kind of problem that X Windows tried to solve... running a remote application with local rendering of a rich GUI.
I gave up on X and I still do the same thing you do: I have putty and Samba-mounted files that I edit with Visual Studio. Visual Studio is the best text editor I've ever used. All the other Visual Studio IDE features are gravy.
There's some solutions :
VmWare : not free but really good
Virtualbox : free but less powerfull than VmWare
KVM/Qemu : Free but less powerfull than VmWare

Which Linux distribution should I go for learning C/C++/Assembly in Linux

I am a primary windows developer with experience in C#, .NET, Visual C/C++. I want to lean C/C++ development in linux in order to create portable GUI applications which run on both Windows and Linux.
I have used Fedora in past (2005). Want your suggestions to know which is the best distribution currently to learn programming in linux.
You can't really go wrong with any of the major ones. Personally I use Debian, but Fedora and OpenSUSE are good choices as well.
I would also like to point out that you can use C# to create portable GUI applications. Have a look at Mono and Gtk#. I have developed quite a few Gtk# apps and they usually run flawlessly on Windows and Linux, with very little work on my part. It might not be a bad introduction to coding on Linux, as you will be able to use a familiar language.
Any modern Linux distribution will do, as they all includes (or makes it easy to install) GCC. To easily create portable GUI applications, I would recommend taking a look at Qt.
Since every distro worth its salt has a Development Package that includes gcc, g++ and gdb, it's really going to come down to the IDE you develop your code in. Eclipse is an excellent IDE for C & C++ which just happens to be written in java. So long story short, use whatever distro you are comfortable with, it really doesn't matter all that much.
There is none Distribution you couldn't use. If you want an easy distribution working almost out of the box. With a lot of things configured automatically i would suggest you use ubuntu.
If you like to do more things on your own I'd tend to debian. Anyway you could simply code with qt and use the linux box for debugging only.
Slackware, ArchLinux or CentOS.
Stay away from Ubuntu and its derivatives, you will spend more time messing with packet manager apt-get than doing code. If you choose Debian-derivatives you will spend time wondering why your programs dont work only to find out you need packetname-devel also (!)
A base Slackware install should be enough to get you started, if you would like to keep having the latest programs, use ArchLinux.
You wrote "to create portable GUI applications which run on both Windows and Linux" - I suggest that you consider Qt (used to be from Trolltech now part of Nokia). http://qt.nokia.com/products/

C++ development for Linux on Windows

I am trying to setup a development environment for Linux C++ application. Because I'm limited to my laptop (vista) which provides essential office applications, I want to program and access email, word at the same time.
I'd prefer a local Windows IDE. SSH to a company linux server and using VI doesn't seem productive to me. Even using some IDE installed on the linux server doesn't seem good to me, because I can't do the work at home.
So does Eclipse CDT + MinGW work for me, or is there any other choice?
Thanks.
ZXH
Why not install a Linux virtual machine on your laptop, in VMware or similar? That way you can test while you're developing too.
You can also try http://cygwin.com/
Is it a GUI app? And do you have to target Linux specifically? If not, Qt (http://trolltech.com/) may be something that you can use. It would allow you to more or less develop your whole application on Windows, and then spend a few hours on a linux machine getting the whole thing ported...
Qt is the best choice. I develop with tis tool for a long time. And you can develop with the same ide : QtCreator and the same framework : Qt on MacOS, Linux based or Windows plateform...
Moreover, specifically on Linux, Qt is well integrated with Kdevelop !
If you have Visual Studio, which I feel is an excellent IDE, you can try to set it up to use GCC/G++. I've done this before, back in the Visual Studio 6 days. As long as you aren't using any Windows-specific libraries and write portable C++, you can compile and test on Windows, then periodically ensure that the code also compiles properly for Linux.
Another approach, one that I actually prefer, is to host your source and make files on the Linux box, share the files through Samba, then use your Windows IDE/text editor to edit those files. Then, you can do the compiling through an SSH terminal. Sure, you'd lose the convenience of being able to compile through your IDE, but at least you wouldn't have to muck around getting the compiler set up on Windows.
If you have a linux server available to you, you could also use NX to log in graphically, and use a Linux IDE there like Code::Blocks, or shudder Eclipse. Of course, there's nothing unproductive about shelling in and using VIM. I find it's a good way to shake out the IDE-induced cobwebs every now and again. Happy coding however you end up doing so!
I use (and recommend) Netbeans for C/C++ Development together with Cygwin to develop POSIX applications on Windows that will run on Linux/Solaris later on.
It is pretty easy to setup as long as you stick to the stable version of Cygwin.
I was in a similar position 2-3 years ago and tried several approaches, but the only one that really worked wor me was vim+ssh (+gdb, make, svn, etc). But again, I use vim even for Windows development.
This slideshow (PDF) walks through how to set up a cross compiler from Windows to Linux.