Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I developed a C++/QT application and I am trying to compile it for Mac, Windows and Linux. I chose C++ just so I can make it compatible with these major operating systems. I can compile it for mac just fine.
I found out about Cross Compiling but some are outdated or not well documented... or does not guarantee they will work on the latest version of Windows or a Mac.
I do have Virtual Windows and Cent OS installed on my machine but I feel that compiling the application manually would be over kill.
So, do you recommend any reliable cross-compiler? Or is there any way to automate the compilation so if I have to, it can compile by logging on to my Virtual Windows or Cent OS installations?
FYI... not only cross compile but also generate 32 bit and 64 bit versions!
For Mac and linux you don't have a big issue here if you got the g++ compiler installed in your OS. But you will need to install Mingw or cygwin in the Windows installation to provide the gcc and the g++ compilers for your programs and if you want to automate your compilation process you can use a Makefile or try to see the autotools.
The only cross compiler that I know of is GCC. I have actually used it on Linux to cross-compile for S/390 a while back, and also to cross-compile ARM code on a Power Mac (I used the instructions here to set it up).
That said, I think that what you want is to cross-compile Windows x64 on a 32 bit virtual machine running Windows. If that is the case you are lucky, because Microsoft actually gives away the cross compilers for free with the Windows SDK since Windows 2000 SDK. I actually use the Windows Vista SDK (ver 6.1) on Virtual PC running XP to compile for Windows x64. Here you can download the latest version of the SDK, which comes with the compilers. I looked on the system requirements and it still supports XP, so this should be good for you.
Please note that the compilers are the same that come with Visual Studio, but you will have to invoke them from the command line environment installed by the SDK by either using 'cl' or 'nmake'.
You can chose the compilation mode by issuing SETENV /x86 for 32 bit or SETENV /x64 for 64 bits -there is another mode for Itanium but I have never used it-. The Visual Studio IDE is not included because it is a paid product, but good quality compilers for free is a good enough to anyone.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I installed Cygwin on my laptop. After going through the instructions on netbeans site, i found that i need to change the path directory.
My path directory initially shows some java thing on that and if i change it then will it create some problem?
I basically Want to run C/C++ programs by NetBeans so I installed Cygwin thinking that it would help me.
Please Suggest me what to do.
Took this from the original guide
Cygwin is a Linux-like environment for Windows. It consists of a DLL
(cygwin1.dll), which acts as an emulation layer providing substantial
POSIX (Portable Operating System Interface) system call functionality,
and a collection of tools, which provide a Linux look and feel. The
Cygwin DLL works with all x86 and AMD64 versions of Windows NT since
Windows XP SP3. The API follows the Single Unix Specification as much
as possible, and then Linux practice. The major differences between
Cygwin and Linux is the C library (newlib instead of glibc). With
Cygwin installed, users have access to many standard UNIX utilities.
They can be used from one of the provided shells such as bash or from
the Windows Command Prompt. Additionally, programmers may write Win32
console or GUI applications that make use of the standard Microsoft
Win32 API and/or the Cygwin API. As a result, it is possible to easily
port many significant UNIX programs without the need for extensive
changes to the source code. This includes configuring and building
most of the available GNU software (including the development tools
included with the Cygwin distribution).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am the lead developer in a small business which is just starting. We are developing a cross platform C library which is intended to run on as wide an array of architectures and operating systems as possible. We have extensive unit tests, so if these tests pass on a new platform then we can say with a fair amount of certainty that the library works reliably on that platform.
Up until now, I have been using Windows 32 bit (which is my development machine), as well as a Linode VPS to make sure the library works under Linux with GCC. Now, I am looking to deploy for other platforms as well (namely more Linux distribution flavors, Mac OS X, and preferably some of the smartphones if at all possible). I want to avoid virtualizing all of these platforms if I can. Are there any services that will allow me to deploy the library on many operating systems and architectures? For all of the platforms I mentioned above, I would like to make both 32 and 64 bit builds available and also for different processors as needed. I would like to be able to build the library for all of these platforms, and run the unit tests. The unit tests are written using Boost.test.
Does anyone have any recommendations? The best way would be if there was some sort of convenient cross compiler for the various platforms that I could install on my Linode VPS (Ubuntu 13.04), but a third party solution to which I should upload the code would also work.
The only cross platform compile (which has a tradition, is free and has the support of a large community) is gcc. Of course, there is Intel Compiler and many others (and even the newer, free clang which seems to be used by llvm, but it is still young). You can find a good list here (for C++, but you can scroll on the page and find for any other language):
http://en.wikipedia.org/wiki/List_of_compilers#C.2B.2B_compilers
If you want to build for Mac from Linux please check this:
http://www.bpiwowar.net/2012/06/cross-compiling-for-os-x-with-distcc-on-linux/
And for windows from Linux:
Manual for cross-compiling a C++ application from Linux to Windows?
Regarding the mobile platforms:
for Android, there is native support for Linux/Windows/Mac so you can use any of these platforms to build apps for it
for Windows Phone: Not so, maybe you manage to run Visual Studio using wine and then you're set, but otherwise there is no way that I know of. You can try CodeWeaver which is the "Wine for money" which seems to support Visual Studio 2008:
http://www.codeweavers.com/compatibility/browse/company/?letter=m;company_sort%5Bcompany_name%5D=ASC;company_curPos=200;company_id=1;sort%5Bapp_name%5D=ASC;curPos=400
Furthermore, you can try this application to develop programs in .NET:
http://monodevelop.com/
for Iphone: well, it is not straightforward but you can try this link:
http://www.saurik.com/id/4
I'm a Linux user myself, so the links above are "concentrated" on Linux as the primary dev system. Hope this helps! Good luck with your business!
This question already has answers here:
windows version of the GDB frontend DDD
(5 answers)
Closed 4 years ago.
I heard that there is a graphical debugger by GNU called DDD, which will help to learn C. I have searched DDD for windows 7, but i won't get anything useful. All i saw is DDD on Linux. My question is can i install DDD into Windows 7 ? if so where can i find set up file and other information ?
You can do it installing Cygwin. In this way you can use all the linux GNU Tools under Windows.
Cygwin is a Unix-like environment and
command-line interface for Microsoft Windows. Cygwin provides native
integration of Windows-based applications, data, and other system
resources with applications, software tools, and data of the Unix-like
environment. Thus it is possible to launch Windows applications from
the Cygwin environment, as well as to use Cygwin tools and
applications within the Windows operating context.
Here's the Cygwin installation guide.
First off, because you're learning C try to resist the temptation to depend entirely on your debugger to figure out what's wrong with your code. A debugger assists the brain but shouldn't replace it.
That being said, it might be less ambitious to start with a free IDE+toolchain with a decent debugger that's a bit easier to get up and running than Cygwin & friends.
I've always liked the now opensourced Watcom C toolchain a lot, and it comes with a nice debugger. It's showing its age a bit, but it's still a very capable tool.
Microsoft still offers its Visual Studio Express "lite" version of VS for free. Aside from some restrictions, it's a Visual Studio 2012.
And of course there are the IDE's built mostly around gcc, like Code::Blocks, Eclipse CDT and many others
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've learned C and C++ in Borland's Turbo C++ IDE, the 16-Bit version with that old blue screen background, in which I started off building console programs for Windows. Now that Windows Vista and 7 doesn't support that IDE to be run in full-screen mode, I'm looking for such similar IDE (not necessarily from Borland), that comes with GCC, and doesn't need much learning to use if one has already worked with Turbo C. So is there any free GCC IDE that works with Windows 7? I'll not be using it for developing Windows applications, since I need it to practice on data structure console programs.
Turbo C++ is very old, and the concepts and philosophies of IDE design as (as well as the language C++ compilers are compiling) have developed much further since.
You might try Code::Blocks or Eclipse, but I wouldn't expect a transition as smooth as going to the next version of Turbo C++. (Which weren't as smooth either, BTW. The latest of that series, BCC 5.0 was quite different to the old DOS TC environments, and even that got abandoned later in favor of the very different C++ Builder IDE.)
BTW, does it have to be GCC? Visual C++ Express is free also, the VC compiler isn't worse than GCC, and the IDE is quite good.
There are a few C++ IDEs with many features.
Bloodshed Dev C++
NetBeans C
C++ IDE
Eclipse CDT
CodeBlocks
Also take a look at Cygwin which provides a linux like environment for Windows. If you are making console applications, using a good shell won't hurt.
An open source IDE that runs on Windows that should get more mention than it currently does is QtCreator. While it's tailored to working with the Qt framework, it works just fine for non-Qt-based C++ work (though you won't get much help in the form of UI wizards unless you're using Qt for the UI).
It's much lighter than Eclipse/CDT and I find it easier to use (though I normally use Visual Studio over either QtCreator or Eclipse/CDT).
General information/marketing for QtCreator: http://qt.nokia.com/products/developer-tools/developer-tools
Nokia provides a Windows package that includes the MinGW GCC compiler. Go to the download page and select the "Qt Creator 2.1 Binary for Windows" link (I have no idea why Nokia doesn't link to the download from the info page): http://qt.nokia.com/downloads
Of course if you just want a free C++ IDE for Windows, and don't really care if it's GCC or MSVC based, I'd suggest getting VC++ Express: http://www.microsoft.com/express/Windows/
If you're looking for a beer-free IDE, just download Visual Studio Express from Microsoft - it's not gcc behind the covers but it is tuned very well for Windows.
If you're after a speech-free one, Code::Blocks is the best I've ever seen. The larger setup package for Windows includes the backing gcc compiler and gdb debugger.
You can use codeblocks: http://www.codeblocks.org/
It is not a console IDE but you can build console programs and watch the output in a window.
The best solution if you are using windows is CODEBLOCKS-EP(Education Portal).
You can find it at http://codeblocks.codecutter.org/
Once you find it, I would personally recommend the "Zip (CodeBlocks-EP.zip)" file download.
Hope this helps.
Happy Coding
I can suggest you Eclipse ID with CDT (you can download bundle from http://eclipse.org) + MinGW compiler tool. Or You can use the Code::Blocks IDE.
I like Bloodshed Dev-C++, but I don't know if it runs on W7.
I suggest using CodeLite opensource cross platform IDE for the C/C++ programming languages:
It works great on almost all Operating Systems
Windows XP/7 and 8
Debian / Ubuntu
Fedora / OpenSUSE
Mac OSX 10.5.8
http://codelite.org/
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 3 years ago.
Improve this question
I'm looking for just a compiler for C++ (such as g++) for Windows, that I could run in my cmd.
I'm using notepad++ as my text editor and I want to set up a macro in there that can compile my programs for me.
I do not wish to install Cygwin though.
Any suggestions?
MinGW. It's GCC/G++ for Windows. It's much lighter than Cygwin. The main difference from Cygwin GCC is that it doesn't try to emulate UNIX APIs, you have to use the Windows APIs (and of course the standard C/C++ libraries). It also doesn't provide a shell and utilities like Cygwin, just the compiler.
There is also a related system called MSYS, which provides a shell, etc. like Cygwin, but this is not required. MinGW itself will run in CMD (but I highly suggest using something better like Bash, for your own sanity).
Visual C++ has a command line compiler, cl:
Compiler Command-Line Syntax (C++)
If you don't have Visual Studio, you can download the Windows SDK (newer version) or the Windows Driver Kit for free, and then use the CL.EXE command-line compiler as suggested by #Greg Hewgill.
Digital Mars is excellent.
Probably not what you're looking for, but just to add to the question for completeness, the Intel Optimizing Compiler works great on Windows, Linux and Mac Intel platforms. A bit on the pricey side, but for highly optimized compiles on Intel processors it's second to none.
I think that the TDM-GCC from Twilight Dragon Media is more convenient than the official MinGW release. I found it simpler to install and use.
The old Borland C++ non-IDE compiler is freely available:
http://cc.codegear.com/Free.aspx?id=24778
Here is Wikipedia's background on this free, Windows, command-line compiler:
http://en.wikipedia.org/wiki/Borland_C%2B%2B
With Windows 10, you can use g++ via the Windows Linux Subsystem.
Once you've set it up, install g++ using the bash terminal (this answer on Ask Ubuntu shows you how).
Bear in mind: you will only be able to run compiled C++ programs in the Ubuntu/bash environment, not from cmd/PowerShell directly:
C:\Folder> bash
User#Computer:/mnt/c/Folder$ g++ hello_world.cpp -o hello_world
User#Computer:/mnt/c/Folder$ ./hello_world