Archived

This topic is now archived and is closed to further replies.

LeoMaheo

Visual C++ .NET 2003 questions

Recommended Posts

Hi! I have been creating a game using Borland C++ Builder for a while but now I am migrating to MSVC++ .NET 2003 and have run into some beginner''s problems. Could you please help me? 1) When building, header files are not found unless I specify the exact relative path to them from the .cpp-file. In the Project Property Pages, I have set the Resources | General | Additional Include Directories to appropriate directories - if the compiler would be searching these directories it would find the header files that it is looking for. Why doesn''t this setting have any effect and what should I do in order to avoid being forced to specify the complete relative search path to all included files? 2) Is there no way to tell the compiler to stop compiling when an error is found? Right now, if there is an error in file no. 1, the compiler insist with trying to compile all the other around 50 files and generates around 300 errors, which is really annoying! 3) Is there no way to get the compiler to tell what .cpp file it is compiling when an error is encountered in some header file, not just the header in which the error is encountered? In Borland C++ Builder you can actually see exactly how the file being compiled have included one file that has included another that has included another ... that has include the file with the error in. Is there no such opportunity in MSVC++? Thanks / Magnus

Share this post


Link to post
Share on other sites
quote:
Original post by LeoMaheo
1) When building, header files are not found unless I specify the exact relative path to them from the .cpp-file. In the Project Property Pages, I have set the
Resources | General | Additional Include Directories
to appropriate directories - if the compiler would be searching these directories it would find the header files that it is looking for. Why doesn''t this setting have any effect and what should I do in order to avoid being forced to specify the complete relative search path to all included files?


That setting is only for includes for RESOURCE files. Use Project Properties->C++->General->Additional Include Directories for directories you want to use in C/C++ files.
quote:

2) Is there no way to tell the compiler to stop compiling when an error is found? Right now, if there is an error in file no. 1, the compiler insist with trying to compile all the other around 50 files and generates around 300 errors, which is really annoying!


Not that I know of. What I usually do if I expect there to be a lot of errors is to compile only that single .cpp(right click on the .cpp and choose Compile).
quote:

3) Is there no way to get the compiler to tell what .cpp file it is compiling when an error is encountered in some header file, not just the header in which the error is encountered? In Borland C++ Builder you can actually see exactly how the file being compiled have included one file that has included another that has included another ... that has include the file with the error in. Is there no such opportunity in MSVC++?


Hm, dunno.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites
quote:
Original post by LeoMaheo

3) Is there no way to get the compiler to tell what .cpp file it is compiling when an error is encountered in some header file, not just the header in which the error is encountered? In Borland C++ Builder you can actually see exactly how the file being compiled have included one file that has included another that has included another ... that has include the file with the error in. Is there no such opportunity in MSVC++?



There are two tabs in the output screen. One is the "task list" and the other is the build output. look on the build output, it will tell you which file it was compiling when it encountered the "included error". In fact, I''m pretty sure there''s a switch to turn off the task list altogether, although I don''t have VS.net at work so I can''t tell you now.

"That''s not a bug, it''s a feature!"
--me

Share this post


Link to post
Share on other sites
2) Ctrl+Pause (also known as ''break'')

3) In the Output window, you will see messages like ''compiling foo.cpp'', followed by all the error messages that occurred during compilation of foo.cpp

Share this post


Link to post
Share on other sites