how to compile a FMU on windows to be used in Mac? - windows

I have generated one FMU on Windows, and imported the FMU on Mac using Matlab Simulink, and got the following error. I searched for the problem and get some clues from the answer here
https://tomlankhorst.nl/quick-fix-matlab-fmu-import-error/, it seems like FMU will be stored as different form when generated on Windows and Mac.
the question is: is it possible to generate a FMU on windows that still works on Mac.

In order to compile for MacOS, you need the C headers for the MacOS platform. These are only available in XCode which only runs on MacOS and the headers themselves are not allowed to be redistributed.
As such, it's pretty hard to cross-compile for MacOS. You can install XCode on your Mac, move the required headers to your system and compile a Darwin toolchain on your Windows machine (I believe), but it's very error-prone and annoying to update for newer MacOS versions.
The easiest way would be to run MacOS and cross-compile Windows+Linux binaries since these platforms are less closed.
Or like #matth commented, generate a source-code FMU and compile that using the native toolchain on any platform you need.

Related

Video editor for android - FFmpeg won't compile on windows?

Im trying to make a video editor for android (I've never made an android app before)
After searching for libraries to use I came across FFmpeg but I'm having trouble getting it to compile on Windows 7.
I'm currently using Eclipse and have the most recent android SDK and ndk.
I've been trying to follow tutorials on the internet including roman10's (http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/) but they all seem specific to Linux.
Yesterday, I thought I'd give up and just dual boot Ubuntu on my windows laptop but of course that was messing up too. I shrank my partition and booted Ubuntu of a USB but the installer was detecting there is no OS on my laptop and not giving me the option to install it alongside windows 7.
So, can FFmpeg be compiled for android on windows? Or is there another library I could use to make a video editor that can?
Or should I just persist with dual booting ubuntu?
Thanks
Maybe you have already know that on Windows you must use Cygwin. This is open source tools which provide functionality similar to a Linux distribution on Windows.
I work with ndk in linux. It avoids many problems and errors which i can found in Windows.
Here link how to start work with Cygwin:
http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/

Creating a cross-compiler environment to build package binaries

I have the feeling that this would involve major nitty-gritty-details-stuff, nevertheless I'd like to give it a try:
Actual question
What do I need to do to set up an cross-compiler environment that allows me to build package binaries for platforms other than MS Windows (I guess at the moment this would only be Mac OS's tgz binaries) on MS Windows? The accepted answer in this post suggested that this is possible.
Background
I have quite a few mac users in my university's beginners R course that don't really know their way around the system specifics of Mac OS and therefore would be overextended with setting up the necessary development tools it takes to compile from source on Mac OS. Therefore, I'd like to offer them a tgz binary, but I need to compile on Windows as there's no apple hardware available to me.

Mac compiler on windows

Is it possible to develop cross-platform application on Windows and can also compile for Mac OS X from Windows? I have checked Qt but that requires one to compile from Mac using Xcode.
If this is your priority then one option would be Java as at least a jar file built on one platform can be run on another.
If however you're talking about C or C++...
If you are creating a small command line tool then you might be able to make this work with gcc and a cross compiler, but I think it would be a lot of work.
If however you are wanting to create a GUI application I would urge you to give up now. There are so many issues - you'd have to use Carbon or Cocoa APIs which you can't build for on any other platform, you'd have to link against frameworks which won't exist on your compilation host, you won't be able to easily generate .plist files. Qt won't help as you need to be able to build it, which relies on these same frameworks.
In short, there's no alternative to building on an actual mac.
Furthermore, when it comes to fixing bugs, you will absolutely have to do this on a mac (either physical or virtual).
From what I know , in general you do need a mac to make the executable , even for a simple ansi c program you need gcc for mac.
You can create MacPorts Portfile.(If your application is open source)
A MacPorts port is a set of specifications contained in a Portfile
that defines an application, its characteristics, and any files or
special instructions required to install it. This allows you to use a
single command to tell MacPorts to automatically download, compile,
and install applications and libraries.
Take a look at IMCROSS.
IMCROSS is a simple, scripted method of installing cross-compilers and
cross-compiled libraries on a Linux (or possibly other *nix) system,
so that you can develop programs targeted to run on Microsoft Windows
and Mac OS X at the same time and in the same environment as you
develop Linux versions of those programs.
You can certainly do this using Real Studio. It can create Mac OS X applications on Windows without any trouble.
It cross-compiles for Windows, OS X and Linux. And it does it from any platform. It also can create web apps.
Sounds like you should check it out.

compile lanshark on mac

I am trying to compile lanshark for mac, but do not know how to compile on mac. I am guessing that it is possible to compile linux source code on mac. if not how can i get this program to run?
A mac is, under the hood, a BSD 'darwin' box.
Go and take a look at the MacPorts webpage. You'll find lots of interesting information (like where to get a compiler etc ) there.
Another place to go for an apple development environment is apple (xcode) ...
It should be possible to get that to run, but it will be a bit of work. The source may need a small amount of modification, depending on exactly how the protocol works (if they're using raw ethernet, that is done quite differently). Also, the OS X linker (ld) works completely differently to the Linux linker, and so the build system will need a bit of tinkering.
However, the compilers and build utilities are in the XCode bundle on your install disk, or at the download link in the other answer, so install that and give it a go. If you're lucky, just following the Linux instructions will build it.

How to make qmake compile multiple cross platform binaries

I'm using QT Creator on a project and was wondering if there's a single command to compile the project to a Mac, Windows, & Linux binaries so I can easily send them to other computers for testing without having to send over the whole source code. Currently I'm running the QT Creator on Mac OSX if that matters.
This is possible, but it isn't as simple as you imply. To properly do this, you would need to set up a cross-compiling environment complete with libraries already compiled for the other platforms, and compilers/executables compiled for your platform that produce output for the other platform. You would then need to keep track of all these variables somehow in your qmake file to be sure you're producing the correct output.

Resources