Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

visual studio question/problem

Brian_Murphy
New Contributor II
991 Views

I'm going nuts.  I'm building a DLL in 4 flavors.  Three work and one is screwed up.

Debug|win32, Release|win32 and Release|x64 all build ok and put files in their like-named folders.  But when building Debug|x64 visual studio keeps putting those files in the Debug|win32 folder.  The command line in visual studio looks correct and shows x64 folder location, but files are going to win32.  What could I possibly have done to screw this up?  The compile command in the buildlog shows the wrong folders, but after 4 hours of misery I cannot figure out what's going on.

0 Kudos
1 Solution
IanH
Honored Contributor II
905 Views

That's the one.  As per previous post - see how the line for HydrodynMod (about fifth or so down in the list of projects) is set to build Debug | Win32 when you've got Debug | x64 selected for the solution? 

With Debug | x64 selected in the main visual studio toolbar - some part of your solution are building 64 bit, some parts are building 32 bit. This dialog controls the mapping.

Change the setting for that project (click on the little down arrow next to Win32 in the line for HydrodynMod and change it to x64) to be the same as for the solution config listed at the top of the dialog.  Do that for all projects for this particular solution configuration (with the solution set to Debug | x64, I expect all projects should be Debug | x64). 

Check the other relevant solution configs (e.g. Release | x64) too.  Whatever you select under Active solution configuration and Active solution platform in this dialog box, the resulting Configuration and Platform fields for the project contexts should match, unless you are doing something special. 

When you add new configurations to a solution, you need to use this dialog to check things are ok.  Depending on how you add the new configurations, VS will set things up in a certain way by default that might make sense in some circumstances, but not all.

(There are cases where you might want individual projects to vary from the solution - for example you might have a "half debug" solution config where some projects have debugging configs (because you think they have a problem) and the rest are release configs.  Similarly, you might bundle a 32 bit executable with an otherwise mostly 64 bit package for backwards compatibility or whatever.)

 

View solution in original post

0 Kudos
8 Replies
IanH
Honored Contributor II
982 Views
I guess... your solution config is inconsistent with the individual project config.
But don't make me guess, attach the sln and v*proj files...
0 Kudos
Brian_Murphy
New Contributor II
957 Views

Attached are the vfproj file and its parent .sln.  Also included are buildlog's for x64 Release and Debug.  The Debug one has the problem with the target folder, and fails to build.  My next step would be to toss the vfproj and create a new one.  

0 Kudos
IanH
Honored Contributor II
945 Views

It is an inconsistency between solution and project configs.  Within Visual Studio, use the dialog displayed by Build > Configuration Manager to check and set the correct project configurations for each solution configuration. 

For a specific example, when the active solution config is Debug and the active solution platform is x64, make sure the individual project configuration for HydrodynMod is Debug and individual project platform is x64 (and make sure the project is selected to be built, if that's what you want). 

(Check all your projects for all relevant config | platform combinations - more than one is astray.  If you are just doing Fortran and C++, then solution platforms other than Win32 and x64 may not be relevant.)

 

0 Kudos
Brian_Murphy
New Contributor II
940 Views

Thanks for looking at the files.  I followed your instructions, but still get the same result, i.e. x64|Debug will not build.  I made sure the choices in the Configuration Manager matched the choices in the toolbar dropdowns.

I am building exclusively for Windows.  So only win32 and x64 matter.

Before this latest problem popped up, I always used the pair of dropdown lists in the vs toolbar to make my build selections, and that has worked fine every time.  It still works now, expect for this one particular case.

0 Kudos
IanH
Honored Contributor II
930 Views

Are the errors the same?

Attach a screen shot of the configuration manager, showing a solution config of Debug | x64.  Attach again the build log from the debug x64 build (after having made the fixes in the configuration manager discussed earlier). 

The drop downs in the toolbar at the top of the VS window select the solution configuration to build.  The configuration manager then maps that solution configuration across to each project.

0 Kudos
Brian_Murphy
New Contributor II
919 Views

Image 32.png

Is this what you wanted?  Buildlog is attached.  Even though the log clearly says Build started: Project: HydrodynMod, Configuration: Debug|Win32, this most definitely came from doing a Debug|x64 build.

0 Kudos
IanH
Honored Contributor II
906 Views

That's the one.  As per previous post - see how the line for HydrodynMod (about fifth or so down in the list of projects) is set to build Debug | Win32 when you've got Debug | x64 selected for the solution? 

With Debug | x64 selected in the main visual studio toolbar - some part of your solution are building 64 bit, some parts are building 32 bit. This dialog controls the mapping.

Change the setting for that project (click on the little down arrow next to Win32 in the line for HydrodynMod and change it to x64) to be the same as for the solution config listed at the top of the dialog.  Do that for all projects for this particular solution configuration (with the solution set to Debug | x64, I expect all projects should be Debug | x64). 

Check the other relevant solution configs (e.g. Release | x64) too.  Whatever you select under Active solution configuration and Active solution platform in this dialog box, the resulting Configuration and Platform fields for the project contexts should match, unless you are doing something special. 

When you add new configurations to a solution, you need to use this dialog to check things are ok.  Depending on how you add the new configurations, VS will set things up in a certain way by default that might make sense in some circumstances, but not all.

(There are cases where you might want individual projects to vary from the solution - for example you might have a "half debug" solution config where some projects have debugging configs (because you think they have a problem) and the rest are release configs.  Similarly, you might bundle a 32 bit executable with an otherwise mostly 64 bit package for backwards compatibility or whatever.)

 

0 Kudos
Brian_Murphy
New Contributor II
895 Views

"Ahhh, I see!" said the blind man.  The problem was right there in the screen shot of my last post, and I could not see it.  After correcting that, x64|Debug builds with no trouble.  Thank you very much for pointing this out, and that settings in the Configuration Manager can override settings in the dropdowns.

I still have more work to do to get to where I can test the actual running of HydrodynMod_x64. 

By the way, Hydrodyn is a very old code with dozens of COMMON blocks.  HydrodynMod is my conversion to USE modules.

0 Kudos
Reply