This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
How to build OpenSSL with MinGW in WIndows?
I have downloaded the OpenSSL source (openssl-1.0.1c) from their website. I need to build/compile this source, so that I can use the same on Windows, MAC and Linux environments. I google'd and read some blogs, but nothing sounds useful for me. If anybody has worked or anybody has relevant knowledge please help me!
Compile once, use the same on all three different environments.
That's not possible, and it's not what cross compilation means. Cross-compiling means (for example), compiling for Windows while running in a Linux environment. It doesn't mean compiling something that will run under both Linux and Windows.
There is no way to build a single executable, which can be used on all three operating systems.
You have to compile the library once for Windows, once for Linux and once for Mac.
Related
I have some binaries from c++ codes supporting Openmp under linux system. I want to run them in the WSL(Windows Subsystem for Linux) on my windows 10. I think I should install some packages to support Openmp. What do I need to install? Follow the windows openmp installation routine to install intel c++ complier? Or ubuntu routine to install a high version gcc? Maybe both? (Then my system disk may not have enough space.)
In case my above question is ill-conditioned, I illustrate my question more detailed as below. I would like to know if I have a binary supporting Openmp. Is it necessary for me to install any package to use it? Could I only set the env "OMP_NUM_THREADS" and use it directly? If I have c++ codes to compile a binary supporting Openmp. What do I need to install under WSL?
I couldn't find an easy tutorial about the openmp under WSL. Forgive my ignorance. Could you give me suggestion? Thank you.
I'm trying to configure CLion with Cygwin, but I'm having trouble with CMake. The program says that the bundled version doesn't work in that environment and that the CMake from Cygwin is outdated (needs a newer version). However, I tried installing an independant CMake but then the program says it isn't compatible with Cygwin. How do I fix this?
screenshot
I'm teaching a C++ programming class this semester. All of my students were able to successfully install/configure CLion without too much trouble. Most of them are on Windows boxes, Win7 and Win10.
In my instructions, I referred them to this video, which was the best I could find: https://www.youtube.com/watch?v=i2h_976SpV0
Some of the students were missing the debugger the first time they tried this. In the cygwin installer, the number of check boxes is enormous and many of the names are remarkably similar. When we went back through and re-ran the installer, in each case we were able to find a place where they had checked the wrong box.
So my recommendation would be re-run your cygwin installation after watching the video once through. Then go back to the frame in the video where he shows all his checked install options and very carefully compare your checked boxes against the presenter's.
Good luck!
I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.
Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.
What is the best way of doing this or am i barking up the wrong tree?
It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.
As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.
Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.
I've taken the route described by Noah - and I was incredibly surprised that after about three weeks development on Windows, it took about 10 minutes to get the application running on the Mac.
My route was to install Xcode 4.3 on an old Mac Mini running snow leopard, then install Lazarus using the fink version as described here. This took a while but was done in an evening.
Then I just copied my folder across to the Mac, opened the lpi on the Mac, compiled it. It failed so I removed a windows references, recompiled, and it was working. I was truly amazed.
What linker and assembler do you use to generate binaries? To my best knowledge the linker for recent OS X versions is not available in source.
Afaik what you want (crosscompiling to Mac) is not possible for recent versions (and I've done it for PowerPC myself in the past).
The easiest is to use the Unix "file" command on the binary to see what is generated, and make sure it reads something with "MachO" in it. Easiest is if you have a Linux install (where this command is pretty standard), but versions can be found for windows too (cygwin, mingw and 3rd party)
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.
I've been looking on golang.org for a Windows compiler, but I can't seem to find it. I can only see Linux and OS X compilers. Does anyone know if Go programming can be done on Windows, or is it something that Google hasn't implemented yet?
Update: appears that as of now (Nov. 2012) golang.org has official binary releases for windows 32/x86_64.
There are now installers for Windows, see Go under Windows
HelloWorld.go
package main
func main() {
println("Hello World!");
}
Compile with 8g, link with 8l and then execute. Example:
8g HelloWorld.go
8l -o HelloWorld.exe HelloWorld.8
HelloWorld
It hasn't made it onto the Go Lang FAQ yet, but from the changelog:
Why doesn't Go run on Windows?
We understand that a significant fraction of computers in the world
run Windows and it would be great if those computers could run Go
programs. However, the Go team is small and we don't have the
resources to do a Windows port at the moment. We would be
more than willing to answer questions and offer advice to anyone
willing to develop a Windows version.
Yes! As of 2012 the Go homepage offers an official Windows installer (32 or 64 bit) https://golang.org/dl/
Despite the fact that Go is only two days old, this question has already become a FAQ on the Go mailinglist. (Unfortunately, it has not yet been added to the FAQ list on the website.)
Basically, Go is done by a very small group of people, so they simply do not have the time nor the resources to do a Windows port. That very small group of people also happens to be the people who invented Unix, so that was kind of a natural first target.
So if you, like me, are on Windows a lot of the time and want to do some Go programming right now, you can do it on a VM. I use VirtualBox running Ubuntu in seemless mode. I already had it set up because I like Linux better than Windows for a lot of things.
Building and working with Go has been totally painless for me. I have a Bash open in a terminal to run my build and try my app. The source directory is a shared folder between Windows and Linux (a VirtualBox feature but I'm sure VMWare has the same thing). I edit my code in Komodo Edit on Windows and use Mercurial for the same source code on both OSes.
Not yet.
The authors of Go have very very deeply roots on non Windows operating systems ( Trivia: who of them created no less than the very UNIX operating system )
So, don't expect to have a Windows port from them any time soon.
The language is open source, so it will be just a matter of time ( make it from 6 - 8 ehrm months ) for a Windows implementation will be available.
Although there is no Windows version at the moment, it can presumably be compiled using Cygwin on a Windows platform.
Various efforts to port Go to windows are underway.
The most advance and that can already build and run some code is here: http://code.google.com/r/hectorchu-go-windows/
Installation of Go on windows is straight forward if you use the experimental x32 windows port . Documentation of the steps for Go installation on windows can found here
You will probably also want the MinGW tools (bash, make, gcc, etc...):
http://sourceforge.net/projects/mingw/files/
and the GTK+ files and tools (the "all-in-one bundle" includes pkg-config):
http://www.gtk.org/download/win32.php