HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Question 1: When I link my program, it fails to produce the .exe file.
Error: Gcc.exe: installation problem, cannot exe 'stubify': no such file or directory (ENOENT)
Solution 1: For some reason the CD does not install 'stubify.exe' with the DJGPP Compiler. Copy it over to your hard drive and it should work from there.
Question 2: On the execution of the test program hello.exe I receive "program too big to fit in memory"
Solution 2: Close all other applications running in the background then execute the program.
Question 3: Why can't I select Borland C++ in my Borland program group? I keep getting an error saying that bc.exe cannot be found.
Solution 3: The BCW shortcut in the program group allows you to access the Windows version of the compiler. The "shortcut" Borland C++ does not work from the program group. It is unable to find the file bc.exe. You will need to go to your desktop and create a shortcut to the bc.exe file that can be found on your hard drive in the borlandc\bin directory. This will allow you to use the DOS version of the compiler.
Question 4: What are the instructions for using the Visual C++ compiler?
Solution 4: Here are the corrected instructions:
1. Start the compiler
2. Choose File, New from the menus.
3. Choose Win32 Console Application and enter a project name, such as Example 1, and click OK.
4. Choose An Empty Project from the menu of choices and click Finish and then click OK.
5. Click on the File View tab near the bottom left of the screen.
6. Double click on the Example 1 files that is located in the File View box on your screen.
7. Highlight the Source file by clicking on it once.
8. Choose File, New from the menus.
9. Choose C++ Source File and name it ex1.
10. Enter the code as indicated on page 16.
11. Choose Build, Build Example1.exe.
12. Check that you have no build errors.
13. Press Control+F5 t run the program.
14. Press the Spacebar to end the program.
Question 5: Trouble with the Help "DOCs" it is locking up when setting up the index for the first time.
Solution 5: Actually, it was working. This procedure can take up to 15 - 20 minutes. I just ran it and in looking at task manager it does say the programs are not responding, and that is correct, in a way. The system is off writing the help file, so the other items in VC++6 aren't working right at that time. As long as your system doesn't lock up you are fine. The pen on the book should continue writing and writing and then after a while it will stop and your hard drive will start going like crazy, then the pen will write some more and stop and this will continue until the file is finished.
Question 6: DJGPP Compiler instructions.
Solution 6: 1) Write the source code using Notepad and save it as a .cpp file. This example will use hello.cpp as the file name.
2) Go to the DOS Prompt. (Start | Program Files | MS DOS Prompt)
3) Change the directory to the directory where you saved the source code. (cd\djgpp\src)
4) Type gcc -c -Wall hello.cpp
5) Press Enter.
6) Type gxx -o hello.exe hello.o
7) Press Enter.
8) You will get an error about Stubify, this is okay.
9) Type hello.exe
Sams Teach Yourself C in 21 Days, Complete Compiler Edition, Version 2.0, is the perfect starter kit for new C programmers. The Teach Yourself book is one of the most popular tutorials for learning the C language. Each of the 21 lessons consist of a full-day's activities as you learn the essentials of C. This updated book includes the basic coverage of C including variables, constants, conditional statements, loops, pointers, data structures, disk input/output, and functions, as well as C on Linux and 33% more material on object-oriented programming, including C, C++, and Java.