General discussion

  • Creator
    Topic
  • #2082032

    Programming in C under Win98

    Locked

    by hamdy_z_hassanein ·

    I have Win 98 and FAT32. Can I use MS Visual C++ 6.0 to compile, link, debug and run from source code with the extension “–.c”, although the compiler declares:”Copiling 32-bit module”, and –.c programs run under dos and 16-bit file system? Do I have to format the drive with FAT and use Win95 instead of Win98 because I am getting compiler errors even with the sample code provided by the manufacturer?

All Comments

  • Author
    Replies
    • #3903243

      Programming in C under Win98

      by munawar ·

      In reply to Programming in C under Win98

      ‘.c’ Programs do not necessarily run under dos or 16-bit file systems. A ‘.c’ program denotes that the program is a C program and not a C++ Program. It has nothing to do with the file-system or OS.

      You don’t have to format your FAT32. ‘.c’ programs will run under any filesystem as long as your compiler can handle it.

      Your compiler errors are probably related to your compiler trying to compile your code as a visual C++ program. You can try a) Renaming all your ‘.c’ files to ‘.cpp’ files and try compiling. Even though this isn’t very elegant or nice, it works sometimes. Secondly, try checking what type of project you created. I have a feeling you picked 32-bit Windows Application. Try creating a 32-bit console project or one of the other BLAND projects were MSV C++6.0 doesn’t create any extra code and modules for you. Hope this helps. (PS – I create ‘.c’ projects on my Win98 using MSVC++ 6.0 all the time.)

    • #3903242

      Programming in C under Win98

      by jeng ·

      In reply to Programming in C under Win98

      Generally, you do not need to reformat your drive to compile/link/debug/run your program. To debug your program, you should “step” through your program, or set breakpoints in the program through the IDE (integrated development environment) and run your program from within the IDE. Also, make sure you’re compiling with debug options enabled.

      It’s kind of odd that you are using an extension “–.c”. You may want to change it to the traditional “.c”; if it’s a C source program. If that doesn’t solve your compiler errors, you should re-examine your code.

    • #3900339

      Programming in C under Win98

      by huda ·

      In reply to Programming in C under Win98

      I really agree with Munawar answers. Make sure you have include all include files (.h files) and libraries files(.dll file) needed for your program otherwise it’s won’t works. You can copy related .dll files into c:\windows\systems folder and copy all the .h files into c:\…\Microsoft Visual Studio\Vc98\Include folder. And don’t forget to set up the include files folder in your program under Tools\Options\Directories menu bar and you should also type in the .dll files in project options text box under project\settings\link menu bar. I hope these would help you. I used to have the same problems when I leart using opengl in c programming in my computer graphics course.

    • #3900310

      Programming in C under Win98

      by jkorte ·

      In reply to Programming in C under Win98

      I don’t think any Microsoft VC++ product has allowed compilation of DOS apps for some time. I use version 1.52 when doing DOS apps. I think version 2.0 will work as well. I think version 4.0 would not allow DOS apps, but would allow 16 bit windows apps.

      Don’t bother changing the FAT – it is not the problem. Your development environment is the problem.

      Good Luck.

    • #3900304

      Programming in C under Win98

      by ram_cv ·

      In reply to Programming in C under Win98

      I agree with Munawar that this is not a problem of the OS. It will compile as long as the code is compatible with your C compiler. If these problems still exist you can try to use the keyword extern C in front of the functions you declare in the file. This way you will force the compiler to compile it as a C file.

    • #3897223

      Programming in C under Win98

      by x-cyber ·

      In reply to Programming in C under Win98

      You don’t have to format your Hard Drive using old FAT-16, because there is no relation between FAT-32 (bits) and 32 bits C++ compiler. You get compiler errors, because of errors (or Warnings) in the source code, not in Windows, nor in the File Sytem. So you may use Visual C++ in Windows 98 machines with FAT-32, and run most of the old 16 bits C programs. You can’t run the old programs that access the FAT (16 bits) directly (and I think you DON’T have any of those program).

    • #3896800

      Programming in C under Win98

      by mightyduk ·

      In reply to Programming in C under Win98

      The file extension .c is accepted by Visual Studio as a valid C++ source code file. It has nothing to do with the O/S that the program was written for. In fact if the source code is properly written it shouldn’t matter which O/S it’s running on. The .c extension is traditionally used for C programs, since C++ is a superset of C, the code should run without modification. The problem could be the VC++ environment specifically. When you create the project it should be set as a Win32 Console Application, and once created you could double check that the Project Options are set for Non-MFC. If the project is set-up otherwise, it will require WinMain and WinProc which are used for Windows programming. Hopefully this will assist you… Bestof Luck.

    • #3741822

      Programming in C under Win98

      by hamdy_z_hassanein ·

      In reply to Programming in C under Win98

      This question was auto closed due to inactivity

Viewing 7 reply threads