How to make executables work on OSX Mavericks [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've been working on a school project, in C, and I plan to distribute it to students and anyone interested...
The problem here is the executable file won't run on OS X Mavericks...
is there any way they can do this without getting a simulator, or an application like wine.
( Like how you have to install Visual C/C++ & DirectX for games? )

Since C compiled code is not platform agnostic like Java, you need to compile the code for the target platform(s) you are interested in.
If you have access to OSX Mavericks, you can compile on that OS to get the executable and test. (Copy your C source code to the mac OS, or better use a source control system like git)
If you do not have access to OSX, you can look up how to build/use cross compiler. (Links to related SO questions below that address this)
The effort needed for cross-compile and test would likely be non-trivial, so if you can get access to OSX that will be your best bet.
In either case, you will have to make sure the code written is platform-agnostic.
Several similar questions on stack overflow that talk about the various cross compiling options:
Way Cross Compile C/C++ code to run on Windows, Linux, and Mac OS?
How to Compile for OS X in Linux or Windows?
Porting C++ code from Windows to the Mac

Related

Environment COBOL, C, DB2 on Ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Corona sent me home and our company has strict rules and I don't have access to the network (IBM mainframe). I'm learning to program in COBOL, C, DB2 environment.
COBOL calls C, C works with DB2.
I'd like to continue working from home but I'm not an administrator.
Do you have any guidence, tips and tricks on how to set up an environment for this in Ubuntu?
So far I have a couple of editors, DB2 installation, gcc, gnu cobol...
Stuck on the embedded sql precompiler...
gnucobol and gnucc both work with Db2-LUW on ubuntu linux.
You can build and run gnucobol programs that use embedded-SQL.
You can build and run gcc programs that use embedded-SQL via the preprocessor that comes with Db2-LUW, or which use the Db2 call level interface.
Each of these products has its own set of documentation pages online.
You have to spend time studying their respective documentation.
Stackoverflow is more suitable for specific programming questions.
You will get better answers if you learn to ask better questions that:
show your code fragment as plain text (not an image).
detail the environment and versions and tools that you use
show the command(s) you run (as plain text)
show the error output (as plain text) and mention the expected result
IBM's Db2-LUW has many example programs and simple build scripts (including for linux) that show how embedded SQL (used from C) can be used.
This was explained to you in January 2020, in answer to your previous question on the same topic.

Port C Project from Windows to Linux [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am tasked with porting a massive c project from windows to linux. I have never ported anything over to linux before and am pretty new to linux. The project uses quite a bit of win32 calls. I have looked through some of it and understand what those parts do, however there are many moving parts and i feel it would take too much time to look through it all. What would be the best way to port it over? Is it foolish of me to think I can move the project over to the linux machine and work through the errors one by one?
Thank you in advanced!
Wine is a Windows Emulator for Linux, more exactly a re-implementation of the Windows API and binary interface, mainly for Unix-like OSes. It has also a builtin library named libwine, which is essentially a compatibility layer between the relevant Linux APIs (mainly: libc and X11) and the Win32.
Compiling the project with libwine, you will compile a Linux executable (binary), using the libwine as a shared lib (shared lib == dll). On this way, you can use the Windows API calls in a Linux project.
Your knowledge of the Win32 API helps a lot, most likely the compatibility isn't 100%. Probably you will have to modify the code a little bit (but not too much).

Cygwin or Gnuwin32 or MYSYS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I've tried to google it and I understood some stuff, but still don't know which one is suitable for my needs.
all I want to do is to compile C file (or C++) under Unix environment (so I can use Fork and stuff that don't work on windows) and run these files after compiling it.
to be more exact, I need to use Fork+Semaphores and to use OpenMPI. I know I can do these with Cygwin (or that's what I understood), but it seems like it has a very large size, so I thought if this Gnuwin32 or MYSYS can do what I want to do and they have less size then Cygwin, then it's better ?
If you are absolutely sure you require fork and cannot instead use a more platform independent way of multiprocessing (a thin fork/CreateProcess wrapper) or multithreading (pthreads, Boost.Thread, C++11 std::thread, ...), then you are forcing yourself to use Cygwin.
Note that Cygwin's fork is pretty much as efficient as fork can get on Windows, which is not very, as the OS wasn't designed with that operation in mind, hence the kernel level support is missing.
Cygwin itself is not that big: it's only a DLL you link to that provides the POSIX interface. But do note that Cygwin is GPL and linking to the Cygwin DLL will force copyleft on your project as well.

How to start cross compiling for an arm platform [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm completely new on the whole cross compiling scene, but I'm willing to learn. My objective right now is to compile a simple program (written in C) for an Arm M0 processor. I would like to do it as much as possible with free tools (open source or official, it does not matter). My PC runs a Debian Testing x64 operating system. My specific questions are:
1) What tools should I download? (can be console or IDE, whichever works best in your opinion)
2) Could you point me to a good tutorial that can teach me the basics? I know this is far from trivial and something hard to accomplish if you have little experience, but I want to try and I'd appreaciate a hand getting started.
Just to clarify, my objective is a program for an M0 that is not in any specific board or build. Which means I'm going to have to define where the memory is and configure the communication with the PC. So the tools need me to allowed to do that.
In Linux machine first of all you need to install arm toolchain.
sudo apt-get install gcc-arm-linux-gnueabi
Second step compile your program let say hello.c by
arm-linux-gnueabi-gcc -o hello hello.c
you can find how to cross compile toolchain,programs and library for ARM platform.
You can also check GNU Tools for ARM Embedded Processors

Which Linux distro uses Linux kernel as is with no modification [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to do some learning with Linux kernel and as you all know there is nothing better than playing with the code itself, Can you please let me know which one of the Linux distros is the easiest to work with? In other words, As far as I know Ubuntu for example modify the kernel for their distro, so the question again, which distro is using the Linux kernel as is with no modification?
Appreciate your guidance.
When it comes to no-frills (no external patches to the kernel) have a look at Slackware. Or follow "Linux from Scratch", that's as bare-bones as it gets.
If you want to start playing with the Linux kernel, I'd recommend a distribution which makes it particularily easy to compile the kernel yourself. Although I cannot provide detailed guidance, Gentoo seems to do so (although gentoo has other drawbacks, I don't know a single person in real life who actually used gentoo for more than two years).
I would not try and look for distributions not modifying the kernel, it's probably not worth the effort. Patches will probably be minor compared to the overall size of the kernel.
You can easily run Ubuntu for example with a vanilla kernel by following https://wiki.ubuntu.com/KernelTeam/GitKernelBuild.

Resources