General discussion

Locked

Programming in C under Win98

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?

This conversation is currently closed to new comments.

15 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Programming in C under Win98

by Munawar In reply to Programming in C under Wi ...

'.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.)

Collapse -

Programming in C under Win98

by hamdy_z_hassanein In reply to Programming in C under Wi ...

The question was auto-closed by TechRepublic

Collapse -

Programming in C under Win98

by jeng In reply to Programming in C under Wi ...

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.

Collapse -

Programming in C under Win98

by hamdy_z_hassanein In reply to Programming in C under Wi ...

The question was auto-closed by TechRepublic

Collapse -

Programming in C under Win98

by huda In reply to Programming in C under Wi ...

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.

Collapse -

Programming in C under Win98

by hamdy_z_hassanein In reply to Programming in C under Wi ...

The question was auto-closed by TechRepublic

Collapse -

Programming in C under Win98

by jkorte In reply to Programming in C under Wi ...

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.

Collapse -

Programming in C under Win98

by hamdy_z_hassanein In reply to Programming in C under Wi ...

The question was auto-closed by TechRepublic

Collapse -

Programming in C under Win98

by ram_cv In reply to Programming in C under Wi ...

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.

Collapse -

Programming in C under Win98

by hamdy_z_hassanein In reply to Programming in C under Wi ...

The question was auto-closed by TechRepublic

Back to Web Development Forum
15 total posts (Page 1 of 2)   01 | 02   Next

Software Forums