Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / April 2006

Tip: Looking for answers? Try searching our database.

Project seetings being ignored in VS2003 - is this a bug?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bit byte - 13 Apr 2006 16:26 GMT
I am pretty close to the end of my tether at the moment.

I have a project which requires some header fies - which happen to be
located in another folder (the relative path from where my sources are
is simply (..\include).

For the life of me, I can't get VC7 to 'grok' the headers during a
build. This is how I set the additional includers (someone correct me if
I'm doing something wrong):

1). Select appropriate project in solution viewer (actually only 1
project in soln anyways)
2). Select Project->Settings from menu
3). In the property pages dlg box, I click on Resources->General
4). I select 'Additional Include Directories' and type in either
'..\include' or '[full_patname]\include' - BOTH DONT WORK.

I still get 'file not found' error when I attempt to build:

c:\devtools\pgdev\libpq++\pgconnection.h(30): fatal error C1083: Cannot
open include file: 'libpq-fe.h': No such file or directory

WTF?

By the way, I have checked and the files do exist, so thats not the problem.
Doug Harrison [MVP] - 13 Apr 2006 16:38 GMT
>I am pretty close to the end of my tether at the moment.
>
[quoted text clipped - 21 lines]
>
>By the way, I have checked and the files do exist, so thats not the problem.

The Resources tab is for the resource compiler, not the C++ compiler. Try
the "Additional Include Directories" under the C/C++ General tab.

Signature

Doug Harrison
Visual C++ MVP

Carl Daniel [VC++ MVP] - 13 Apr 2006 16:40 GMT
> I am pretty close to the end of my tether at the moment.
>
[quoted text clipped - 10 lines]
> 2). Select Project->Settings from menu
> 3). In the property pages dlg box, I click on Resources->General

This is the wrong place - you're defining additional includes for the
resource compiler.   You need to set them in Project->Settings, C++ ->
General -> Additional Include

-cd
Bit byte - 13 Apr 2006 17:17 GMT
>>I am pretty close to the end of my tether at the moment.
>>
[quoted text clipped - 16 lines]
>
> -cd

Thanks Carl.

You see this what I love so much about Microsoft software. It is SO VERY
reliable - compared to g++/make etc (Yeah RIGHT).

My point is, in previous projects, when I have been so fortunate as to
'have' to use MSCV, I have used exactly the setting syou described.
However, back then, I noticed that sometimes, the option you suggested
(Project->Settings, C++ -> General -> Additional Include) is available,
and sometimes it is not. I wrote to ask people in this ng some time last
year, what on earthwas going on. People happily ignored my post or tried
to convince me that that cannot be happening. I promptly dropped MSVC,
and did not use it gaain. Unfortunately, I have to use it for this
project - and hey presto, the same problem crops up again.

By the way here is some extra info (if that does help):

MSDEV ver:     7.1.3088
.Net Framework:    1.1.4322
Project type:    DLL

Carl, the menu you suggested, is not available. Please advice.
Marcus Heege - 13 Apr 2006 17:54 GMT
Hi Bit byte,

>>>I am pretty close to the end of my tether at the moment.
>>>
[quoted text clipped - 39 lines]
>
> Carl, the menu you suggested, is not available. Please advice.

I have the same versoin numbers, and I can see this setting for my projects.
How have you created your project?
Bit byte - 13 Apr 2006 18:04 GMT
> Hi Bit byte,
>
[quoted text clipped - 44 lines]
> I have the same versoin numbers, and I can see this setting for my projects.
> How have you created your project?

Marcus:

File -> new Project
Visual C++ Projects-> Win32->Win32 Project
Application Settings:
    App Type: DLL
    Additional options: Empty project

Only other point to note is that my cpp files have extension *.cc (can't
see why this would be a prob though - since I changed the filter
property for the  'Source Files' folder.
Marcus Heege - 13 Apr 2006 19:51 GMT
>> I have the same versoin numbers, and I can see this setting for my
>> projects. How have you created your project?
[quoted text clipped - 10 lines]
> see why this would be a prob though - since I changed the filter property
> for the  'Source Files' folder.

Even if I use the .cc extension, I can see that option. If you look at the
configuration properties for a C++ file and check the setting for General ->
Tool, do you see the setting "C/C++ compiler Tool"?
Bit byte - 13 Apr 2006 20:16 GMT
>>>I have the same versoin numbers, and I can see this setting for my
>>>projects. How have you created your project?
[quoted text clipped - 14 lines]
> configuration properties for a C++ file and check the setting for General ->
> Tool, do you see the setting "C/C++ compiler Tool"?

No. This is *PRECISELY* my point. The "C/C++ ..." menu under general is
no longer available. What I did not (bizzarely though) is that if I do
not choose the 'Empty Project' option, I have this menu option. However,
if I remove the stdafx.h and other crap it generates and replace them
with my own source files, I have this problem.

I know I shouldn't antagonize you because you're probably going to be
the one who helps me - but I'm really having to hold back the torrent of
abuse I want to direct to this mickey mouse Windoze environment and its
assortment of 'developer tools' - there I (almost) said it ... Arghh !
Carl Daniel [VC++ MVP] - 13 Apr 2006 20:27 GMT
> No. This is *PRECISELY* my point. The "C/C++ ..." menu under general is no
> longer available. What I did not (bizzarely though) is that if I do not
> choose the 'Empty Project' option, I have this menu option. However, if I
> remove the stdafx.h and other crap it generates and replace them with my
> own source files, I have this problem.

IIRC, the C++ options won't appear in the project properties unless there's
at least one file that's recognized as being a C++ file, and I'm pretty
certain that .cc isn't in that list for VC7.  With VC8 (2005) there's an
option to add new file extensions to the list recognized as C++ (or any
other language).  I don't recall if that option is available for VC7 (or
VC7.1), and I don't have VC7 installed anymore to check myself, but I think
that's where your problem lies.  A simple way to confirm (perhaps you've
already done this?):  if you rename your files to .cpp (or just rename a
single file), does the option then show up in project properties?

-cd
Bit byte - 13 Apr 2006 21:01 GMT
>>No. This is *PRECISELY* my point. The "C/C++ ..." menu under general is no
>>longer available. What I did not (bizzarely though) is that if I do not
[quoted text clipped - 13 lines]
>
> -cd

And the prize goes to .... Carl (incidentally, my name sake). Thanks
Carl, It was the .cc extension that screwed things up. I renamed the
files and tested it after a few flag settings (this is a cross platform
lib I 'm building), I managed to create the dll - Phew, Now to test the
darn thing ... :-)
Bronek Kozicki - 15 Apr 2006 10:04 GMT
> IIRC, the C++ options won't appear in the project properties unless there's
> at least one file that's recognized as being a C++ file, and I'm pretty
> certain that .cc isn't in that list for VC7.  With VC8 (2005) there's an
> option to add new file extensions to the list recognized as C++ (or any
> other language).  I don't recall if that option is available for VC7 (or

isn't it in Tools > Options > Projects > VC++ Build ?

B.
Kim Gräsman - 18 Apr 2006 12:07 GMT
Hi Bronek,

>> IIRC, the C++ options won't appear in the project properties unless
>> there's at least one file that's recognized as being a C++ file, and
[quoted text clipped - 4 lines]
>>
> isn't it in Tools > Options > Projects > VC++ Build ?

Yep, it's there in my VC7.1 install, and the default includes *.cc, so it
probably doesn't affect what the project system thinks is C++...

--
Best regards,
Kim Gräsman
Carl Daniel [VC++ MVP] - 18 Apr 2006 16:11 GMT
> Hi Bronek,
>
[quoted text clipped - 9 lines]
> Yep, it's there in my VC7.1 install, and the default includes *.cc,
> so it probably doesn't affect what the project system thinks is C++...

That sounds familiar - it's there, but it only partially works.  Something
along the lines of enabling C++ syntax highlighting, but not cluing the
project system in that .cc is a C++ file.  IIRC, there's a registry entry
that can be hacked to get new file extensions to work in 7.1.

-cd
Marcus Heege - 13 Apr 2006 20:39 GMT
>> Even if I use the .cc extension, I can see that option. If you look at
>> the configuration properties for a C++ file and check the setting for
[quoted text clipped - 4 lines]
> remove the stdafx.h and other crap it generates and replace them with my
> own source files, I have this problem.

The subtrees of configuration properties depend on the tool that is
selected.
If you click on "General", you should at least see the properties "Exclude
From Build" and "Tool". If you set the property "Tool" to "C++ Compiler
Tool" and click "Apply", the C/C++ subtree should appear.

Q1: Do you see the "General" subtree and the "Exclude From Build" and
"Tool"?
Q2: What is the setting for your "Tool" property?

> I know I shouldn't antagonize you because you're probably going to be the
> one who helps me - but I'm really having to hold back the torrent of abuse
> I want to direct to this mickey mouse Windoze environment and its
> assortment of 'developer tools' - there I (almost) said it ... Arghh !

No worries :-) I would bet that most complains about Microsoft are written
in Word :-)
Bruno van Dooren - 13 Apr 2006 20:43 GMT
>> Even if I use the .cc extension, I can see that option. If you look at
>> the configuration properties for a C++ file and check the setting for
[quoted text clipped - 4 lines]
> remove the stdafx.h and other crap it generates and replace them with my
> own source files, I have this problem.

if I rename all cpp files to cc files, the C++ tab disappears from the
project properties sheet.
if I check the properties of the cc file itself, it still has the
possibility to select the compiler tool (C or C++)
i think cc is not recognized as a c/cpp extension.

> I know I shouldn't antagonize you because you're probably going to be the
> one who helps me - but I'm really having to hold back the torrent of abuse
> I want to direct to this mickey mouse Windoze environment and its
> assortment of 'developer tools' - there I (almost) said it ... Arghh !

I have done large projects on linux with gcc/make as well.
It has its own share of quirks :)

I suggest trying Carl's suggestion of renaming the files to cpp, and then
under configuration properties->C/C++ ->general add ..\include to
'additional include directories'.
That should solve the problem i think.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.