Bug 15617 – New project wizard creates broken projects

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-01-28T12:04:00Z
Last change time
2017-01-24T08:01:03Z
Assigned to
nobody
Creator
turkeyman

Attachments

IDFilenameSummaryContent-TypeSize
1579test.ziptest caseapplication/x-zip-compressed3663

Comments

Comment #0 by turkeyman — 2016-01-28T12:04:57Z
Here's a very simple project I made using the wizard. There are some problems that will cause hassle for new users. Steps to reproduce: 1. Create new C++ Win32 Console Propject -> empty project this creates an sln and a vcxproj 2. Add a .cpp file 3. Right click the solution -> add -> new project... 4. Add a D static lib project 5. Right click solution -> project dependencies... -> set the cpp project to depend on the d project At this point you see the structure in my attachment (just without any code) You need some code to test the issues I report, so load the project I supplied for these tests. There are 2 problems: --------------------- Set platform to x64, try and build. Notice that the D project was created without an x64 platform, so it doesn't build for x64 build configurations. VS2015 created the C++ project with x86 and x64 platforms, but the D project wizard only created a project with x86. * The D project wizard should probably create configurations for either or both platforms depending which are present in the solution. -------------------------------------------------------------- Set the platform to x86, try and build. Both the C++ and D projects build in this configuration, but you'll see a link error about corrupt object. Problem is, the x86 config is not building MSCOFF even though it's being inserted into a solution where a C++ project is dependent on it. * Suggest, either MSCOFF is default x86 setting. Or detect presence of other C++ projects and set it in that case. If creating a project in a solution with other D projects, it should probably check the state of the flag for the other projects and follow accordingly.
Comment #1 by turkeyman — 2016-01-28T12:05:31Z
Created attachment 1579 test case
Comment #2 by turkeyman — 2016-01-28T12:11:16Z
Also, as a bonus, if you look in the project settings, I had to configure cpp to link d.lib manually. The dependency linking didn't seem to work again in some cases. I have found reproducing this to be unreliable though.
Comment #3 by r.sagitario — 2017-01-24T08:01:03Z
The project templates now come with both x86 and x64 settings. The broken lib dependency is https://issues.dlang.org/show_bug.cgi?id=15099