Should I use CodeTyphon in Win or Lin for cross-platform development? - cross-platform

Lazarus CodeTyphon Edition looks promising to me as a Delphi developer. I tried installing it on my Windows 7 64-bit machine, and I can compile for Win32 (it seems), but not for anything else. It appears that "ppcrossx64.exe was not built" - oh well.
My question is, would it be better to develop my apps on a Linux box, if I wish to cross-compile? I read on the FPC wiki that it would be better, but not sure if that applies to CodeTyphon as well.

Related

Can you make WSL interface with windows installs? [duplicate]

How do I avoid installing same programming languages both in WSL and Windows10?
I am thinking about using WSL as a dev workspace. However, I realized I will need to install Node.js, Python, create-react-app, and so on in WSL even though my windows 10 already have them installed.
It would be helpful if you could spare me some advice.
Thanks.
To some degree, it depends on what type of development you are doing. Given your example languages/tools, I'm going to assume that most of your development is platform agnostic, web-development, etc.
My recommendation is to go all-in on WSL and install the Linux versions of the tools you use (with some notable exceptions covered below).
Uninstalling the Windows versions is recommended, but not strictly necessary. I recommend uninstalling because I continue to see a number of questions across the Stack sites where it becomes apparent that the Windows version of Node or Python is getting called from inside WSL. It's likely that some tool, such as nvm or equivalent, attempted to prepend the Windows Node or Python location to the Linux path.
This causes problems, as the Windows versions Node and Python understand Windows paths and processes. When you call them from the Linux shell in WSL, the shell/OS uses, of course, the Linux versions. And Windows Python just won't understand something like /mnt/c/Projects. It needs C:\Projects. You can work around this with utilities such as wslpath (automatically installed in some WSL distributions, installable in all others), or you could just manually adjust the path. But ... why go through the hassle if you don't need to.
Just use the Linux versions, with the corresponding Linux paths and instructions. Most development tools, tutorials, instructions, etc. are going to "default" to the Linux doc. It will typically be more complete, more up-to-date, etc.
And, of course, the Linux command-line experience is (subjectively, sure) far-and-above better than PowerShell. Don't get me wrong, I like PowerShell, but I like PowerShell even better when I call it through WSL (powershell.exe or pwsh.exe), since I can take advantage of Linux niceties like less (or bat), jq, and many others.
Not to say there aren't WSL caveats that you have to get used to. Be prepared to run into a few snags here and there (lack of Systemd support, permissions, filesystems, inotify), but most everything has a workaround that you'll typically find here on Stack (Stack Overflow, Ask Ubuntu, Unix & Linux, and/or Super User) if you search.
And for those "notable exceptions" I mentioned, I recommend installing:
Windows Terminal (available in the Microsoft Store), which will provide an upgraded terminal experience for WSL.
The Windows version of Visual Studio Code -- I've seen a question from someone here who tried to install the Linux version. It's just not necessary. Microsoft has done a great job of integrating the Windows version of VSCode with WSL. Just install the "Remote Development" extension pack, which includes the "Remote - WSL" extension.

Which Codewarrior version is needed for HCS08 and HCS12X under Windows 10?

I use Codewarrior
- V4.7 for HCS12X
- V6.3 for HCS08
in Windows XP.
Moving CW to Windows 10 seems impossible.
It won’t install, and dongle licensing does not work.
I have tried to figure this out on the NXP site, but I find it extremely difficult and confusing.
Which Codewarrior is needed for HCS12X and HCS08 in 32 and 64 bit Windows 10?
Yeah it is nearly impossible. I've struggled lots with this problem. There is an unofficial "hack" someone made - won't link it because my browser says the site is unsafe. However, it would seem that hack only works up to Windows 8, not on Windows 10. I have both IDEs (HCS08 and HCS12) running perfectly on a Windows 7 machine, with dongle license.
We managed to get it running so-so on Windows 10 by doing a dirty hard copy of the hacked installation folder to Windows 10. Various mysterious bugs followed though, so not the best idea.
Another option is to run the Windows XP mode emulator from Microsoft, but it is no longer supported for Windows 10.
So ultimately there are two options left if you are stuck with Windows 10:
Move development to the worst IDE ever released, Codewarrior for Eclipse. Please note that the future of this IDE is uncertain after the NXP merger. They might decide to put their money on their other trash IDE, LPCxpresso.
Port your project to another compiler or MCU.
I would recommend to install it in a VMWare or virtualBox container using Windows 7 as OS.
This makes it possible, that your installation will work even in some years.
I'm using such a container (with WinXP) for an old Visual Basic 6 installation and HEW-IDE.
You should use at least Win7, to avoid the network problems with WinXP (SMB1 can't be connected anymore).
There is a Codewarrior Classic 6.3 community project for RS08, S08, ColdFire V1 for Windows XP, 7, 8, 8.1, and 10. Basically, the installer is repacked will all service packs and patches for USBDM and PEMicro tools.
If you have an obsolete programming tool you will need to use CW 6.3 on XP. Also, if you have these specific family of parts S08: RN, RNA, PA, PT, Kinetis (including Tower), ColdFire V2 you must use the bloated eclipse version CodeWarrior 11
For S12 or S12X CodeWarrior Classic 5.2 for Windows 7 - Windows 10
But when they released 5.2 they removed most of the older derivatives from it, but you can add them back using this procedure CodeWarrior 5.2

Is there anyway to compile mac binaries from a windows machine?

Seems like there wouldn't be, but it would help us out if there was. I wish to pull the source down to a windows server and compile it and have it be the same as if I had pulled the source code down to a mac machine and used xcode on it. Any Ideas?
Reasons: Release Engineering and IT are much more familiar and comfortable on windows, so it would be easier on us, and LaunchD sucks.
Your original question had less detail... I think you are creating more problems than you are solving buy not using a Mac. Is it really that hard to learn to compile under Xcode or type make in the console?
Anyway...
Apple uses a modified version of the GCC C/C++/Objective C compiler with a proprietary runtime library... You could develop using a port of this code to Windows. See GNUStep.Org. This is not binary compatible though but it isn't impossible that you could rebuild it to cross compile to something that was Mac OS X compatible.
Another idea would be to develop using c# .NET and then move the binaries across to Mac OS X and run the binaries using Mono....
None of these options are robust enough to allow you to do this blind without a Macintosh to test and get up and running in the first place.
You can compile cross app with Cocotron but only on Mac
Why do you need launchd? cron works just as well on Mac as it does on Linux, just have a cronjob that does (Extremely simplified version ahead):
cd /my/source/dir
git pull # You are using Git, right?
xcodebuild MyCoolProject.xcodeproj
cp -r build/MyApp.app /the/distribution/folder

Best setup for Linux development from Windows? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
What's the best setup for developing Linux apps from a Windows workstation? Right now I'm connected via SSH to our Linux development server and am using Eclipse, forwarded over SSH via PuTTY, to the public domain version of Xming running on my Windows workstation. It works, but it's not great; Eclipse's response times are far from snappy (noticeably worse than Eclipse running natively on my much slower Windows workstation), I can't resize some dialog boxes, and I haven't figured out a good way to reconfigure my fonts.
Is there a better setup available?
Edit: This is for C/C++ development.
Options for Linux on Windows:
Tools Only
Given you're using Eclipse I'm going to assume you want a full IDE, but if you can get by with just the GNU/Linux tools, there are a few choices.
cygwin gives you a bash shell with lots of tools, including an X11 server. This has been around awhile and is mature.
msys is a smaller, lightweight alternative to cygwin.
GNU utilities for Win32 is another lightweight alternative. These are native versions of the tools, as opposed to cygwin which requires a cygwin DLL to fake out its tools into thinking they are running on Linux.
Linux in a Windows Process
There are several packages that will run Linux as a Windows process, without simulating an entire PC as virtualization does. They use Cooperative Linux, a.k.a. coLinux, which is limited to 32-bit systems. These don't have the overhead of virtualizing, and they start up faster since you're not booting a virtual PC. This is a little more on the experimental side and may not be as stable as some of the virtualization options.
Portable Ubuntu
andLinux
Virtualization
Virtualization software lets you boot up another OS in a virtual PC, one that shares hardware with the host OS. This is pretty tried-and-true. There are nice options here for taking snapshots of your Virtual PC in a particular state, suspend/resume a virtual PC, etc. It's nice to be able to experiment with a virtual PC, add a few packages, then revert to a previous snapshot and "start clean".
VMWare
VirtualBox
VirtualPC
In my case...
Sounds like your environment has different performance characteristics, but here's my situation: I started out with Eclipse on my Windows laptop (doing Rails development), found this sluggish, and switched to using putty to ssh into a fast Linux box. I do my editing via an emacs running on the Linux server, displayed on Windows using Xming. Or I use native emacs on Windows, editing the files shared via NFS. The latter is slower in my environment due to sluggish saves.
When working from home, I ditch X because it is too slow with remote clients, and just run emacs -nw within a putty window. I then use GNU screen so that I have multiple "windows", and so that I can easily resume where I left off if my network connection flakes out.
The best approach that I've found is to:
keep your code portable
develop natively on your desktop
verify any OS dependencies (minimize these as much as possible)
deploy to your target regularly, test & debug there
I know that this isn't a direct answer, but using an IDE for development through X is painful with most of the free tools. The only way that I've been productive doing work this way was when I was running a UNIX-like on my desktop so X was native. If you are going to use this approach, try a commercial X solution on the desktop.
Other than that, consider ditching the IDE and doing your development and debugging via SSH, a terminal editor (e.g., vi, pico, ee, emacs), make/ant, and gdb.
The best approach for you is going to be driven by your programming language and the type of application you're developing. If you are doing GUI applications, then using X might be the only approach that is acceptable. If you are doing back-office/daemon development, then the SSH and terminal approach will probably work though you probably want to get really comfortable with either vi or emacs.
EDIT: just noticed that you are doing C/C++ development. Consider using a cross platform framework if you aren't already. Using something like Qt, APR, ACE, or Poco should make it possible to natively develop under Windows with a deploy/debug step to your Linux environment.
For development I usually use a Linux virtual machine on my Windows box. It will probably send Linux users running to the bathroom to wash their hands, but I do all of my development in Visual Studio, and I have a custom Visual Studio plugin that invokes G++ through the virtual machine and pipes the output into the VS output window. With a quick change of a Combo box I can build and test for Windows or Linux.
An easy to setup option would be to run Eclipse natively in windows but deploy the code via a Samba share on the Linux machine (which you can mount as another drive) (or SSH/SCP if SMB is not an option) and then run it there via SSH console.
Another easy to setup option is to simply develop on Linux via freenx or a similar tool instead of a full blown X session, check this answer: https://serverfault.com/questions/11367/remote-desktopping-from-windows-to-linux/11372#11372
The other options (Virtualization, Linux running inside windows, Cygwin) are indeed valid but have their drawbacks, like being more machine demanding, harder to setup, or not equivalent enough to the actual linux environment, but may very well be worth your while if you have the machine and the scenario justifies their use.
Doing everything on the Linux side will always have some drawbacks
if your machine is Windows.
I personally have a Linux box where everybody else has Windows and
do Windows dev inside a VM, but it has costed me a lot of RAM and some network setup pains.
I find coLinux tremendously helpful when developing on Windows for Linux, it's basically a linux system running in parallel to your Windows OS (i.e. as a service) and can be configured to simply show up on your LAN, basically like a virtual machine does. Also, it's much more full featured than CygWin, and its performance is really remarkable - I can easily run non-trivial stuff under coLinux, and still run simulators at 90+ fps.
Also, coLinux can be easily set up to run X11 and window managers like gnome/KDE, so that you can for example use something like vnc to access your linux desktop.
Cooperative Linux is the first working free and open source method for optimally running Linux on Microsoft Windows natively. More generally, Cooperative Linux (short-named coLinux) is a port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine
. For instance, it allows one to freely run Linux on Windows 2000/XP, without using a commercial PC virtualization software
such as VMware, in a way which is much more optimal than using any general purpose PC virtualization software.
(source: colinux.org)
There are multiple solutions, I'd recommend No. 1
A VM (Virtual Machine) running a flavor of linux as a guest operating system inside Windows. Start with VirtualBox which is free.
To make managing it easier you can use a tool like Vagrant. Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity. So you code in your Windows PC and compile/run the application on a Linux system using Vagrant. Vagrant is free! Similar tool: Docker can be used too. For this setup you can use any IDE, I'd recommend VSCode its quite handy for C/C++ with intellisense but Eclipse should work too.
Web based tool like Nitrous.io which is discontinued, but you can host your own open-source version of the Nitrous IDE called Nitrous Solo which lets you host your own instance of the Nitrous IDE on your preferred cloud provider.
Windows 10 provides provides Windows Subsystem for Linux, try using that to compile and run your project. This requires a 64-bit version of Windows 10 Anniversary Update or later (build 1607+).
Cygwin / MinGW are popular bash tools for Windows, they might be able to compile and/or run your application.
Cygwin might be helpful.
I've done what you want to do for exactly the same reason: full control over the output (you're having font issues with your current solution) and much slower Windows machine than the remote Linux development box.
Most answers are bogus: having a "Linux development environment" is not just "having an IDE". It's about having the whole Un*x power at your fingertips.
Is it a local or remote Linux server? bandwith issues? Because on a LAN, even an old 100 MBit/s LAN, FreeNX flies. How's the load on that Linux server?
Setup the free FreeNX on the Linux system, install the free FreeNX client on the Windows machine and bingo, you've got your Linux development environment at your fingertips.
FreeNX is much more efficient than VNC, it's night day (VNC is actually pretty bad perfs wise, even compare to Windows's Remote Desktop... But FreeNX flies).
Regarding speed, a long time ago, I set up my main Linux workstation (it was a Pentium 4 / 2GB of memory back in the days) on which I was developing full-time using IntelliJ IDEA (another IDE), to serve a full X session (complete with a window manager etc.) that another developer was displaying remotely to... run another IntelliJ instance (and access all the Un*x niceties). It was on a LAN 100 Mbit/s and it was as if the app was local for the other developer.
Anyway, on today's hardware I cannot imagine how this could not work: I now have here a Core 2 Duo / 4GB of ram as my main desktop and a Gigabit LAN.
Such a setup was working perfectly 4 years ago, it would work perfectly today.
Now if you tell me you have bandwith issues or that the Linux machine you've got your account on is under heavy load or that it's not on the LAN, then things may be different...
How the younger developers who want a powerful Un*x system do it at the company I'm consulting for nowadays (that only has Windows desktops)? Most of them bring their shiny MacBook Pro and use that to develop ;)
I'm using xming as well and suffer from the same problems with Eclipse. Apparently, neither switching to cygwin makes it fast enough. Eventually I switched to developing in vim via xming. It doesn't take as much time as I feared to get used to all the key combinations, and the performance is absolutely smooth. Actually, now sometimes I use vim even when working natively.
Either a Virtual Machine with a Linux-based dev environment, or a local copy of some toolchain-agnostic IDE (e.g. Notepad++, with testing done via MinGW or CygWin as far as you can), or just write in Notepad++ and keep uploading to your dev machine and testing there, which is what I do.
You might try other X servers on Windows such as xwin32 and hummingbird. Note that these are commercial implementations.
Another solution is to install a VM server on your Windows box and install Linux on the VM. Options include VMware (non-free) and Microsoft Virtual PC (free download). VMware is much nicer than VirtualPC (64-bit support, more incentive to support Linux client OSes, etc.).
EDIT: In the last 13 years since this post was originally made, Cygwin/X (and Xming) has gotten a lot better. It's worth trying again. I now use it for my everyday work again.
You could take a look at setting up a svn server on the linux box and then using something like TeamCity todo a build on commit. You could write your code locally and do a commit when you want it to be compiled.
I don't know if there's a more modern route, but the standard way in my time was to run X Windows in Microsoft Windows, that way you can run any number of applications on your Ubuntu machine and control them and display them in Microsoft Windows
Check Check out.
You could try using any of the linux distros for windows, even windows-store have ubuntu, SUSE etc for windows and this could help reduce your coding efforts. This linux distros contain linux shell, kernel etc so you won't be needing linux system everytime debugging or testing your code.
You could also use Visual Studio Code which is far better and fast compared to eclipse and is even supported in linux and mac.
Check this for ubuntu distro on windows store.
Linux distros can also be downloaded from other sources but microsoft urges to use the one from Windows-Store.
Use Linux! I usually have the other problem: developing win under linux.
There is no reason for not doing so: I have win running on a virtual box now almost all the time.
Linux comes with a lot of development tools.
The problem is:
is it a graphical interface?
If no you will have no problems as soon as your code STD/portable.
(X allows you simple stuff too but for an nice application today you need a bit more.)
If Yes then you will have a lot of problems when you actually port the code
on the running platform.
Is it supposed to be portable/exchangeable between linux and windows?
if not, just develop on the native OS. Way less pain. You have Eclipse for both
platforms. Even if you think to port the code on a later stage,
just do the work for one first.
I developed a couple of graphical application under linux which are actually right now
used only under windows. My recipe is: GTK/GNOME. I made it running with cygwin and mingw.
But I guess that Qt has the same usable environment too.
My code went on win with no changes!
[ok.. a couple of touching on file paths... but was a bug..]
There is no way to develop under win and hope to be running on linux unless you are sure
not to use any win libs. That is: in a graphical application almost no chance. Or a lot of
checking... Or you will not be using any win facility. Forget Visual Studio.
Check indeed wine and the winehq pages.
Unless the problem is another, like: using team sharing facilities, or svn or whatever.
Which is not a code development problem but a bit more on the organizational side.
Bottom line:
It is way easier to port a free code on win then a proprietary code on the free market.

Installing Apache Web Server on 64 Bit Mac

I know that MAC OS X 10.5 comes with Apache installed but I would like to install the latest Apache without touching the OS Defaults incase it causes problems in the future with other udpates. So I have used the details located at: http://diymacserver.com/installing-apache/compiling-apache-on-leopard/ But I'm unsure how to make this the 64 Bit version of Apache as it seems to still install the 32 bit version.
Any help is appreciated
Cheers
Add this to your ~/.bash_profile which means that your architecture is 64-bit ant you’d like to compile Universal binaries.
export CFLAGS="-arch x86_64"
This page claims that a flag for gcc (maix64) should do the trick. Give it a whirl, and if you need any more help, post back here.
Be aware that you may run into issues with your apache modules. If they are compiled in 32-bit mode, then you will not be able to load them into a 64-bit apache.
I had this issue with mod_python, took a bit of thinking to figure out this was the reason.
Don't export CFLAGS from your .bash_profile or any other dot file. Your home directory could live on for decades, the system you're currently using is transient.
There's a guide on Apple's web site, Porting UNIX/Linux Applications to Mac OS X, that talks specifically about how to make autoconf and make and other similar build systems fit into the Mac OS X Universal Binary scheme. If you're going to build cross-Unix applications on Mac OS X, you need to read and understand this guide.
That said, I strongly question why you want to build Apache 64-bit. Just because Leopard can run 64-bit software doesn't mean you want all software on your system to be 64-bit. (It's not Linux.) In fact, virtually none of the software that ships with Leopard runs 64-bit by default, and most of the applications included with Leopard only ship 32-bit.
Unless you have a pressing need to run Apache 64-bit, I wouldn't bother trying to build it that way.
If you would have read a bit further on the same site there is some information on compiling Apache in 64 bits mode!
http://diymacserver.com/2008/10/04/update-on-64-bits-compilation/