www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - VisualD D/C++ Win32 precompiled headers issue.

reply Sjoerd Nijboer <sjoerdnijboer gmail.com> writes:
I created a D/C++ Win32 Application project using VisualD, and 
everything works untill the moment I add an empty c++ class using 
the "create a class" wizard.

Files at this moment:
*WindowsApp.d // main function
*Foo.h
*Foo.cpp

 From that moment the source file "stdafx.h" and WindowsApp.pch 
are missing.
So I rightclick the project file and set use precompiled headers 
to no in the C/C++ section.

 From this point expect my small project to compile and run, but 
the build keeps failing using thesame error message.

When I try to manually add a precompiled header the build still 
fails with thesame error message.

Files:
*WindowsApp.d // main function
*Foo.h
*Foo.cpp // #include "stdafx.h"
*stdafx.h // #include "targetver.h"
*stdafx.cpp
*targetver.h // #include <SDKDDKVer.h>

Does anyone experience simular problems, or is it just me not 
being able to create a proper setting?
Aug 26 2018
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 26/08/2018 16:07, Sjoerd Nijboer wrote:
 I created a D/C++ Win32 Application project using VisualD, and 
 everything works untill the moment I add an empty c++ class using the 
 "create a class" wizard.
 
 Files at this moment:
 *WindowsApp.d // main function
 *Foo.h
 *Foo.cpp
 
  From that moment the source file "stdafx.h" and WindowsApp.pch are 
 missing.
 So I rightclick the project file and set use precompiled headers to no 
 in the C/C++ section.
 
  From this point expect my small project to compile and run, but the 
 build keeps failing using thesame error message.
 
 When I try to manually add a precompiled header the build still fails 
 with thesame error message.
 
 Files:
 *WindowsApp.d // main function
 *Foo.h
 *Foo.cpp // #include "stdafx.h"
 *stdafx.h // #include "targetver.h"
 *stdafx.cpp
 *targetver.h // #include <SDKDDKVer.h>
 
 Does anyone experience simular problems, or is it just me not being able 
 to create a proper setting?
This has been reported recently and the new project wizard has been extended and working with precompiled headers should be fixed. Try this preliminary build for the next version: https://ci.appveyor.com/project/rainers/visuald/build/job/94iqvfc4wvpcv0b3/artifacts
Aug 26 2018
parent reply Sjoerd Nijboer <dlang sjoerdnijboer.com> writes:
On Sunday, 26 August 2018 at 19:45:46 UTC, Rainer Schuetze wrote:
 Try this preliminary build for the next version: 
 https://ci.appveyor.com/project/rainers/visuald/build/job/94iqvfc4wvpcv0b3/artifacts
Fails compilation with a different bug: 1>C:\Program Files (x86)\VisualD\msbuild\dcompile.targets(110,15): error MSB4064: The "DoNotLink" parameter is not supported by the "CompileD" task. Verify the parameter exists on the task, and it is a settable public instance property. 1>C:\Program Files (x86)\VisualD\msbuild\dcompile.targets(102,5): error MSB4063: The "CompileD" task could not be initialized with its input parameters. A pure VisualD win32 application seems to work but any D/C++ win32 application seems to fail. So I tried this version from which I assume is the version to bring the fix of the original problem but it still wouldn't compile. https://ci.appveyor.com/project/rainers/visuald/build/1.0.202/job/36p850f70hwyp6r7/artifacts Possible regression or a new issue that doesnt exist on /dlang/visuald, but does on /rainers/visuald ?
Aug 26 2018
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 27/08/2018 00:01, Sjoerd Nijboer wrote:
 On Sunday, 26 August 2018 at 19:45:46 UTC, Rainer Schuetze wrote:
 Try this preliminary build for the next version: 
 https://ci.appveyor.com/project/rainers/visuald/build/job/94iqvf
4wvpcv0b3/artifacts 
Fails compilation with a different bug: 1>C:\Program Files (x86)\VisualD\msbuild\dcompile.targets(110,15): error MSB4064: The "DoNotLink" parameter is not supported by the "CompileD" task. Verify the parameter exists on the task, and it is a settable public instance property. 1>C:\Program Files (x86)\VisualD\msbuild\dcompile.targets(102,5): error MSB4063: The "CompileD" task could not be initialized with its input parameters. A pure VisualD win32 application seems to work but any D/C++ win32 application seems to fail. So I tried this version from which I assume is the version to bring the fix of the original problem but it still wouldn't compile. https://ci.appveyor.com/project/rainers/visuald/build/1.0.202/job/36p850 70hwyp6r7/artifacts Possible regression or a new issue that doesnt exist on /dlang/visuald, but does on /rainers/visuald ?
It's just the preliminary build. AppVeyor doesn't have VS2017 and VS2015 installed at the same time, but building Visual D currently needs both to build the msbuild integration DLLs. As a workaround it just copies dbuild15.dll from an older Visual D installation. I've upgraded the downloaded version, so the next build should be ok.
Aug 27 2018
parent reply Sjoerd Nijboer <dlang sjoerdnijboer.com> writes:
On Monday, 27 August 2018 at 07:35:45 UTC, Rainer Schuetze wrote:
 I've upgraded the downloaded version, so the next build should 
 be ok.
Tested it and it compiles and runs! Thank you so much for this! Main in C++ still has issues with stdafx.h always needing to be present regardless of the settings, but is workable by just having the header present. I haven't encountered issues with main in. It might be usefull if there was some documentation available on https://github.com/dlang/visuald/wiki about adding C/C++, D or mixed C/C++/D libraries to an existing VisualD project. A massive thanks for your quick help! So far this looks realy promising.
Aug 27 2018
parent Sjoerd Nijboer <dlang sjoerdnijboer.com> writes:
On Monday, 27 August 2018 at 11:10:25 UTC, Sjoerd Nijboer wrote:
 It might be usefull if there was some documentation available 
 on https://github.com/dlang/visuald/wiki about adding C/C++, D 
 or mixed C/C++/D libraries to an existing VisualD project.
With that I mainly mean precompiled .dll's and .libs. I'm not particularly interested in source code, but for completeness sake that would also help ;)
Aug 27 2018