Skip to content

Unable to find afxwin.h with MSVS_USE_MFC_DIRS=1 #2148

Open

Description

@bdbaddog

This issue was originally created at: 2008-07-23 06:58:43.
This issue was reported by: mccdo.
mccdo said at 2008-07-23 06:58:43

I have upgraded my scons install to 0.98.5 and am now unable to build my mfc applications because
afxwin.h cannot be found. If I downgrade my install to 0.97.0d20071212 my MFC builds complete without
problems. In both builds I define MSVS_USE_MFC_DIRS=1. I do not have any other information to provide
but am willing to help debug the problem if provide some information on where to begin looking for the
problem.

Doug

gregnoel said at 2008-07-29 06:06:12

Nug party triage. Bill to get in touch with Doug and see if they can come up
with a test case that demonstrates the problem. Once the test case is pinned
down, change the milestone back to -unspecified- and we'll re-triage it.

bdbaddog said at 2008-07-29 14:56:03

Doug - can you provide any more detail and/or a small testcase and/or your
SConstruct/SConscript(s) to help us reproduce and insure we've fixed the issue?

mccdo said at 2008-07-29 17:12:42

I can work up a test case this weekend. Here is the flag I set to resolve my compile issues in previous
releases of SCons:

lib_env['MSVS_USE_MFC_DIRS'] = 1

Without this flag my builds could not find the windows specific headers. With 0.98.5 these headers are no
longer picked up. I was trying to find a way to print the complete compile line the scons uses when
compiling .obj files but could not figure out which debug option would give that to me.

mccdo said at 2008-08-03 14:08:45

Here is a link to a directory that will show the problem. By downgrading to 0.97
you will see afxwin.h can be found. Once scons is upgraded to 0.98.5 you will
see it can no longer be found.

www.vrac.iastate.edu/~mccdo/scons_test.zip

Doug

bdbaddog said at 2008-10-28 23:35:55

Doug,

I just downloaded your testcase.
It's 187k.
That's really to big.
It could be that the scons-addon's your using needs to be updated to work with
later versions of scons.

Regardless, can you recreate the issue with a few line SConstruct and without
scons-addons?
Otherwise I don't think we'll be able to work on this bug.

-Bill

mccdo said at 2008-10-31 08:55:44

I will try to slim this down. I am guessing all the new work on the msvs branch may fix these problems.

mccdo said at 2008-12-08 19:13:32

I recently updated to 1.1.0.d... and spent some time looking into this problem more. It appears there
was an issue with how I was handling my environments. Under 0.97.xx everything worked fine and
must have hidden my misuse of the scons api. I was able to fix my problems by adding this:

 baseEnv[ 'MSVS']['VERSION' ] = 8.0
 baseEnv[ 'MSVS_USE_MFC_DIRS' ] = 1
 ms = Tool('msvc')
 ms( baseEnv )

to my SConstruct. I am not sure why this is required now but all is well for the time being. I would be
interested to know why I cannot set this on my environment as needed in SConscripts to activate MFC
dirs locally for my builds. Or more specifically is it appropriate to initialize a tool on a per SConscript
basis?

In my opinion this bug can be closed unless my above solution is not appropriate.

gregnoel said at 2010-07-21 17:00:31

Bug party triage. Bump the priority of this issue.

Activity

  1. added this to the milestone on Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions