![]() |
|
#1
|
|||
|
|||
Visual Studio .NET 2003 problem in executing C source filesI have recently installed Visual Studio .NET 2003 (due to the fact that I was experiencing linking problems with VS 6.0) . It didnt take long to understand that C programs couldnt be executed that easily in VS 2003 compared to VS6.0. Build and debug options from the menu where gray-unavailable, after that i tried a few things but still nothing happened!
I think that if there is nothing wrong with my configurations then propably c programs in VS2003 have to be called first in a project file. If u have any clue help! |
|||
|
#2
|
||||
|
||||
|
Quote:
No, it's the same thing, only a bit more ANSI compliant Please tell us what you did: did you try building an old VC 6 project, or did you make a new project? What kind was it: console application, or what? If you'll fill us in on the details, I'm sure we'll get this fixed very quickly. You could try building a new Console application and running it - that's simple and should work. BTW, we are talking about VC projects, right? Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
|||
|
|||
|
Quote:
No I am trying to edit and run a simple algorythm (with custom libraries) made in VS6.0, not a project, for a my 1rst semster. my programs have a ".c" extention and they are like this one : CPP / C++ / C Code:
Last edited by LuciWiz : 01-Jun-2005 at 05:01.
Reason: Please insert your C code between [c] & [/c] tags
|
|
#4
|
||||
|
||||
|
Oh, I see.
Well, you'll need a project in VC 6 too, the difference is that it will create it for you when you try to execute the program. Just hit File->New->Project and select the project type to be a Visual C Console Application. Give it a name - in this case let's call it add2. It will generate some files for you, amongst which you will find add2.cpp. Replace this file with your own, either by renaming yours to .cpp or by deleting this one from the project and adding yours in place (you can do this in the "Solution Explorer" pane, located at the left or the right in your IDE). You can run your application now. Unfortunately, when building this kind of application I believe you need to include the all-hated stdafx.h at the beginning of the file (you can't change the default which is set to "use precompiled headers"). You just do this right now so you can run your application, and then decide what kind of project you need. Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#5
|
|||
|
|||
|
Quote:
I did what u told me to do but the file created by this is a .cpp file. Unfortunately I cannot #include my libraries in c++(I couldnt in VS6.0 and i still cant I think that somehow VS 2003 doent support C programming. U can do projects using C++, C# and J#, but u cannot make a project using C!!! Anyway I really apreciate your help and interest. |
|
#6
|
||||
|
||||
|
Quote:
No, no, you can! Please read my instructions carefully. Actually, let me offer a better explanation, I can be really evasive sometimes Look for a pane with a tree like architecture; it should have at least 3 tabs: Solution Explorer, Class View and Resource View. Switch to Solution Explorer and your will see the files "belonging" to the project. *Remove* add2.cpp from the project and then add (you can right-click on the project name and select Add->Add Existing item and browse to your C file). Your C file will be added to the project. Add CPP / C++ / C Code:
at the top of your C file and run your project now. P.S: You could rename the file right there in the project from add.cpp to add.c by right-clicking on it (in the same pane) and selecting Rename. Then, copy and paste the code from the original file to this one. I hope this works! Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#7
|
|||
|
|||
Re:That was close
here is my error from debug: \Documents and Settings\Akis.MICROSOF-D94CDE\Desktop\add2.c(1) : fatal error C1853: 'Debug/Add2.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa) The file I added is made with C(it's extension is .c) but it is displayed in solution manager just as if it was in c++! I think that the problem is that this project doesnt support c source. |
|
#8
|
||||
|
||||
|
Quote:
Yeah, you got that because the stdafx crap is a .cpp file. OK, new plan - and better, I promise Create a new Console application, but this time when you get the options window (before the project is generated), you will see on the left 2 categories: Overview and Application Settings. Click the former and select the option Empty Project. This way you don't have to include the Microsoft specific stdafx and you can just add your file to the project. Finally! Sorry I didn't figure it out before... Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#9
|
|||
|
|||
|
Where are these options?
I cannot find the overview and Application settings, i thought they were on the new project menu but they arent |
|
#10
|
||||
|
||||
|
Quote:
Right after you enter the name for the project and click OK, doesn't a window pop-up? You should find these options on the left side of this window. __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Introduction to .NET | LuciWiz | .NET Forum | 5 | 09-Aug-2007 05:53 |
| Checking source codes of image, audio and video files | onauc | C Programming Language | 5 | 26-Feb-2005 22:47 |
| What is "Ambigious symbol" ??*( a compilation error) | small_ticket | C++ Forum | 2 | 07-Jan-2005 22:10 |
| Having a problem | Chuckles | Computer Hardware Forum | 19 | 13-Sep-2004 13:17 |
| web server in secure mode not connecting to http application | tcsasp | Apache Web Server Forum | 0 | 06-Nov-2003 01:08 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The