VS.NET 2003 hell

Started by
8 comments, last by Penance 20 years, 11 months ago
I just got a copy of this from my school. Now, first of all it screwed over all of my old VC++ 6.0 C projects (keeps saying eh.h is for C++ only...well they''re not C++ files, and i didn''t include eh.h...so stfu MS!) So i try coding some C in vs.net...and for the life of me I can''t find any way to make just a regular freaking blank .c file!!! (So frustrating). Does vs.net even support coding in C anymore? Am I confined to porting all my old C files to C++ and bowing down to the great dark lord''s will? *sigh*
Advertisement
Just make an empty project, and add your C files. Alternatively, file -> add new item (pick text document but call it myfile.c)
Sorry for sounding stupid, and thanks for the help, but I''m really new to .NET and their help files are useless to me.

I tried creating just a blank project but it always includes stdafx.h and stuff like that. So i accepted this fact and just removed them and then told it that I wouldn''t be using any precompiled headers.

Then i did as you suggested and added some new text files as .c and .h files and got my old code where it should be. Then I tried compiling and got over 100 errors about cerrno, cstdlib, cstdio throwing errors (missing }''s and syntax errors).

I just cut and paste my old code into approcriate .c and .h files in .NET...and it worked fine in VC++ 6.0...so you can see why this is so frustrating for me. Any more suggestions?
Be careful, when creating a new project, near the end you will see that you can click on a link to the left and there choose empty project. You are going too fast, you need time to digest the information on your screen. Don''t just click here here boom bam boom.

Good Luck.
Doah, obviously I''m having a really rough day eh?

The errors I am getting are C2143 and C2059, over and over and over again for cerrno, cstdlib and cstdio. I know my code''s syntax is correct and everything was included correctly in VC++6 so I don''t understand what it''s complaining about
quote:Original post by Penance
The errors I am getting are C2143 and C2059, over and over and over again for cerrno, cstdlib and cstdio.

What are those includes doing in a C file? They are C++ headers.


"To assert that the earth revolves around the sun is as erroneous as to claim that Jesus was not born of a virgin."
-- Cardinal Bellarmine
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
This may be a shot in the dark but are you using blah.h or blah ? Remember the "better standards complience" with 2003? well it also breaks some stuff with the earlier VC++ 6.0. I had some of the same problems with C++ code not acting right when transfered into 2003 and that was the problem with mine.
quote:What are those includes doing in a C file? They are C++ headers.


that''s the thing..they aren''t included. I have

#include <GL/glut.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <iostream>
#include <stdio.h>
#include <string.h>

i tried removing the .h''s for "compliance" but then it doesn''t know what files I''m talking about.
It''s a problem with iostream. If i make a regular c file and the simplest hello world prog possible and only include iostream, it get all those errors. if i make it a c++ prog then it works. Very annoying. You''d think coding some C wouldn''t be so difficult!
IOSTREAM is C++!
If you insist on writing C, use printf.
Or give up and realize you're writing C++ and use a .cpp file.
It's up to you.


[edited by - risingdragon3 on May 4, 2003 6:34:20 PM]
hehe, thanks for the er...clarification.
This is what happens when you go to my college and they focus on JAVA as the main Object oriented language...and then they give you a few weeks of c++ and think you''re good to go. Then you take comp graphics and the teacher tells you to submit your work as 1 massive C file because it''s convenient for her...then you end up getting lazy, forgetting your OO concepts and not knowing what the hell you''re doing.

Grr. Thanks.

This topic is closed to new replies.

Advertisement