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

B

Bit byte

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.
 
D

Doug Harrison [MVP]

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.

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

Carl Daniel [VC++ MVP]

Bit said:
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

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
 
B

Bit byte

Carl said:
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

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.
 
M

Marcus Heege

Hi Bit byte,

Bit byte said:
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.

I have the same versoin numbers, and I can see this setting for my projects.
How have you created your project?
 
B

Bit byte

Marcus said:
Hi Bit byte,

Carl Daniel [VC++ MVP] wrote:

Bit byte wrote:


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


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

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.


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.
 
M

Marcus Heege

I have the same versoin numbers, and I can see this setting for my
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.

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"?
 
B

Bit byte

Marcus said:
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"?
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 !
 
C

Carl Daniel [VC++ MVP]

Bit byte said:
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
 
M

Marcus Heege

Even if I use the .cc extension, I can see that option. If you look at
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.

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 :)
 
B

Bruno van Dooren

Even if I use the .cc extension, I can see that option. If you look at
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.

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.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
B

Bit byte

Carl said:
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

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 ... :)
 
B

Bronek Kozicki

Carl said:
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.
 
?

=?iso-8859-1?Q?Kim=20Gr=e4sman?=

Hi Bronek,
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++...
 
C

Carl Daniel [VC++ MVP]

Kim said:
Hi Bronek,


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top