3

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

3
  • 8
    Why are you using a 10 year old compiler? There are FREE, modern compilers for C and C++ out there that are going to save you a world of pain and might actually let you be productive.
    – Joe
    Jun 28, 2010 at 16:30
  • well that;s what the college guys suggest :( I'll better move on!
    – Jayesh
    Jun 28, 2010 at 16:31
  • isn't TurboC 16 bit dos only? If so, including windows.h (probably) won't help. Get Visual Studio 2008 express, or use mingw.
    – SigTerm
    Jun 28, 2010 at 17:52

3 Answers 3

4

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.

4
  • @theatrus: I can't say I like Dev-C++ much myself, but it seemed worth mentioning anyway -- some people seem to like it. Jun 28, 2010 at 16:59
  • Likely Code::Blocks is a better IDE (than Dev-C++) and ships with a more recent MinGW version (that anyway one can install separately), if I remember well. Jun 28, 2010 at 17:11
  • @Shin: I probably should have mentioned Code::Blocks as well. I don't like it much better than Dev-C++ though -- where Dev-C++ is a bit too barebones for my taste, Code::Blocks seems (to me) to suffer from serious feature creep and (in places) poor design. IMO, for an apparent beginner, Dev-C++ is the lesser of the two evils. Jun 28, 2010 at 17:23
  • Some people said Dev-C++ is not good since it is frozen, while C::B is in active development. Personally, for the stuffs I did on Windows (almost nothing!), Notepad++ is more than enough! Jun 28, 2010 at 17:39
4

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.

1
  • 2
    I seriously doubt Turbo C is going to be able to compile the headers shipped with the Windows SDK as those headers contain Microsoft extensions. Jun 28, 2010 at 16:33
3

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.

5
  • Can you tell me if I do all the Win32 programming on my machine, would there be any additional requirements on the end users machine to run the executable? It might sound funny, but I am learning.
    – Jayesh
    Jun 28, 2010 at 16:47
  • @Jay: It depends on how your application is linked. Visual Studio's compilers rely on the MSVCRT runtime, which can be shipped as a .DLL (there is a redistributable installer for this, and most systems have it), or you can statically link the application and avoid the need for the runtime.
    – Yann Ramin
    Jun 28, 2010 at 16:49
  • @theatrus: woah, dude, simply shipping msvcrtxx as dll can lead to many problems. For example, to runtime error R6034 and infamous "application failed to initialize property". You need to install it (MSVCR90.DLL, MSVCR80.DLL, etc) by running required vcredist_x86.exe which can be downloaded from microsoft. This happens because of manifests introduced by microsoft (in winxpsp2, i believe). On systems where manifests "arent supported" (win2k win2003 server), shipping dlls works. On others (winxp, vista, etc)- it doesn't - by copying dlls you'll get r6034.
    – SigTerm
    Jun 28, 2010 at 17:50
  • @theatrus: or you could use static linking.
    – SigTerm
    Jun 28, 2010 at 17:51
  • @SigTerm: I mentioned static linking and the redistributable installer.
    – Yann Ramin
    Jun 28, 2010 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.