I cannot find windows.h in my include folder of Turbo C and hence cannot work with the Win32 api's
Can someone please suggest a workaround?
thanks
You could download Borland C++ 5.5. If memory serves, it can handle Windows programming "out of the box" (Warning: but it doesn't include an IDE of any kind, only command-line tools).
Alternatively, you could look into any of several alternatives such as Dev-C++, Visual Studio Express, Cygwin, or Digital Mars. Edit: Or Code::Blocks, Ultimate++/TheIDE, NetBeans, or Eclipse CDT.
Turbo C is a legacy product. I would suggest moving on.
However, the Windows libraries and header files are shipped with the Windows SDK, which you can find on MSDN.
If you want to work with Win32 APIs, you will probably get the best mileage using Visual Studio (which will have all of the headers and libraries you need). There is even a free edition available.
Related
So the latest version of TCC supposedly has some of the features of C99 implemented, however, I have found that it does not include C99's Math library.
Is there a way I can get it to use more of C99's libraries on windows? I googled around and found some advice mostly pertaining to Linux, but for this project I need to get it to work on windows.
EDIT: This is not a question about getting 'any' compiler on the windows platform. I realize that there are many compilers. I specifically need to get TCC to do this.
EDIT: The project needs to do some on the fly C compilation, and we would like to see if we can use TCC for this feature.
The documentation for Windows indicates that the TCC installation on Windows deploys a minimal set of MinGW headers. Copy the headers you need from MinGW into the tcc/include/winapi (i.e. place them under tcc-build-root/win32/include/winapi) and then build tcc with build-tcc.bat.
Try Visual Studio Express Edition for 'C'.It's free and IDE is more developed than TCC
I'm working on a C program which will be run in Linux and from inside Visual Studio 2010, and I'm looking for a regex library. GNU comes with a POSIX-compatible regex library, but Visual Studio, despite having C++ std::regex, doesn't have a C-compatible library. GNU has a Windows version of their library (http://gnuwin32.sourceforge.net/packages/regex.htm), but the DLLs are 32-bit only and the source code can't compile in Visual Studio (~500 errors!). My only requirement is that the end-user should not have to install anything extra, and should get the same behaviour on both platforms. I'm not picky about whether it's POSIX-style, Perl-style or something else. What should I do?
Thanks in advance.
The one library I've found that compiles with basically no effort, and is also the smallest, is: https://code.google.com/p/slre/. It's pretty basic but is good enough for my purposes. Thanks for the help, though.
I'm currently trying to build a little C app using Eclipse CDT and MinGW, however I've hit a snag.
I'm looking for devicetopology.h among other header files which were introduced as part of the Core Audio API in Windows Vista.
My question is really "why are 4 year old headers still not in the mingw win32api" - not in the ungrateful sense but more along the lines of is there some technical reason why MinGW can't make use of those libraries?
Any missing defs that I've encountered so far I've just defined in my own source, but I'm apprehensive about importing an entire .h file and I'm unsure of where I'd even source such a file other than the Windows SDK which I imagine was designed to compile under VC. I've found a project called PortAudio (http://www.portaudio.com) which has the headers in their SVN but wished to understand the reasons why the headers aren't included in the first place instead of copy paste coding.
I'd just use VS C++ Express to solve this problem, however I missed some of the features which were gimped the last time I used the C# Express version.
Thanks for any help!
To your last comment - what's missing from Visual C++ Express that you get from using MinGW instead? Note that you can also drive the compiler included with VC++ Express (or the compiler that comes with the Windows SDK) from any IDE that supports driving a command-line build - which is what I'd guess you have to do with MinGW, too.
If it's debugging capabilities that you're looking for, the free Debugging Tools for Windows package that comes with the Windows SDK is quite capable (though the VC++ Express debugger is pretty nice, too).
VC++ Express doesn't have MFC, but then again neither does MinGW. So what's missing from VC++ that's hanging you up?
What is the most commonly used (simplest) C / C++ compiler used on Windows when using the NetBeans IDE (6.7)?
I want to write (mostly) simple C programs. I have Cygwin installed but for some reason NetBeans doesn't like it. I'm getting a error from it and before I try to figure this out, I thought I should find and (if needed) configure a more popular one.
makeinfo: --fill-column arg must be numeric, not
nbproject/Makefile-Debug.mk'.
Trymakeinfo --help' for more information.
I believe I'm getting this error because I don't have make installed.
I've also found this stackoverflow post (C/C++ Compiler for windows) but and that suggests to use MinGW compiler tools.
What is the difference between MinGW and Cygwin? Which is better or preferred? and are there any other options?
The difference between Cygwin and MinGW is the the Cygwin tools (and the executables generated) rely on the cygwin DLL that provides a POSIX-like layer for the application.
MinGW are native Win32 tools (in that they do not require the presence of the Cygwin DLL) that produce native Win32 executables that do not need the Cygwin DLL.
My personal preference is for MinGW, but if you're going to be building programs that have a Unix heritage, the Cygwin toolset will likely help you build the program to run on Windows more than the MinGW toolset will.
I'm not sure what the licensing implications of linking to the Cygwin DLL are (I forget if it's GPL or LGPL).
Here is a good post I just found for getting cygwin and Netbeans working together.
Configuring cygwin with netbeans in Windows
And just so you know, cygwin and MinGW are by far the two most popular open source solutions for C/C++ on windows. Other popular compilers exist, but are not free (Borland C++, Microsoft Visual C++, etc)
I'm trying to disassemble a C/C++ DLL, and have made some progress, but I would like to create my own C DLL with the same function the original exports, and compare disassemblies.
Visual Studio adds to much crap, and when I remove the crap and build my project, the expected DLL is missing.
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
Take a look at Code::Blocks
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
I have found that one of the best ways to do integrated C-only Win32 development is using the freely available Lcc Win32 Compiler which comes with a built-in IDE, including resource editor.
In fact, it is really very lightweight and can be run from a USB stick with some manual tweaking.
It's indeed a really small download of just 6 mb and you can even download an optional Win32 API help file which is really useful while doing development.
The compiler also comes with a C tutorial, as well as good user documentation detailing how to use the integrated Win32 resource editor "wedit", there's also an advanced manual about more complex development tasks.
Dev-C++ is a nice and fast IDE which works well with MingW.
But it's all been asked and answered before ...
MinGW adds its own crap. Install your VC express properly and save yourself a lifetime of trouble.
Btw, you don't need to use Visual Studio for its compiler or vice versa. The oddity of missing a build dll is probably because you are not looking at the right path.
If you are building C DLLs you really would benefit from its command line toolset and utilities, sdks, easy config etc. MS lock-in proprietary extensions are widely used (in context of you trying to emulate another dll), and last thing you need is chasing cross compiler issues..
GCC + any text editor such as VIM is a very light alternative.
For Windows Development, all you need is inside MinGW
Edit: If you are in dire need of an IDE you can also use the MinGW tools from Eclipse with the CDT plugin. Although it adds weight to the solution because of the installation of Eclipse, this is what I really use to build my small DLLs (JNI wrappers in my case).
You can setup your small and direct makefiles or let Eclipse do it automatically for you and concentrate only on the source files (*.h, *.c).
The best part of using this approach instead other IDE is that you do not need Eclipse to further build the DLL, since the underlying project files generated are standard ones directly usable by integrated dev inside MinGW (or any Unix distro) such as make, configure, automake, and so on.
I'll second the vote for Code::Blocks, it's what I use (despite having VS 2008 installed as well). It is very simple and lightweight but has basically all the features you'd expect out of an IDE. It comes with several predefined project templates for all kinds of C and C++ development, including templates for DLLs.
Download the version that includes MinGW and you get a complete lightweight IDE ready to start compiling. You can also easily configure it to use the Visual Studio compiler instead of gcc if you prefer.
try Open Watcom. A cross-platform product, well-supported by the community, lets you develop in DOS, Windows, OS/2 etc for a lot of platforms. Version 1.8 was released recently. Has a light-weight IDE indeed