www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Optilink bugs(or DMD)

reply Nierjerson <Nierjerson somewhere.com> writes:
Major optilink bugs, blocker. Code is long but demonstrates the 
issue. Compiles with ldc.

The source is large so I uploaded it

https://ufile.io/odaee

or

https://files.fm/u/frmks29t




OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset 481D2H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main12cApplication15ForegroundColorMFC4main11cSolidColorZv 
(void main.cApplication.ForegroundColor(main.cSolidColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset 49058H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main12cApplication15BackgroundColorMFC4main11cSolidColorZv 
(void main.cApplication.BackgroundColor(main.cSolidColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset 89BFFH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main9cTextItem5ColorMFC4main11cSolidColorZv (void 
main.cTextItem.Color(main.cSolidColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset A6CBEH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main11cSolidColor3RGBMFC4main9cRGBColorZv (void 
main.cSolidColor.RGB(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset A7B4BH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main11cSolidColor4GrayMFC4main10cGrayColorZv (void 
main.cSolidColor.Gray(main.cGrayColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset A89C6H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main11cSolidColor4CMYKMFC4main10cCMYKColorZv (void 
main.cSolidColor.CMYK(main.cCMYKColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset A9421H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main11cSolidColor3LabMFC4main9cLabColorZv (void 
main.cSolidColor.Lab(main.cLabColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset AA29FH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main11cSolidColor3HSBMFC4main9cHSBColorZv (void 
main.cSolidColor.HSB(main.cHSBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset E2D37H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main8cChannel5ColorMFC4main11cSolidColorZv (void 
main.cChannel.Color(main.cSolidColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset C1983H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main24cExportOptionsSaveForWeb10MatteColorMFC4main9cRGBColorZv 
(void main.cExportOptionsSaveForWeb.MatteColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset D33B4H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main20cPresentationOptions14PDFFileOptionsMFC4main15cPDFSaveOptionsZv (void
main.cPresentationOptions.PDFFileOptions(main.cPDFSaveOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset D8777H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main15cGalleryOptions13BannerOptionsMFC4main21cGalleryBannerOptionsZv (void
main.cGalleryOptions.BannerOptions(main.cGalleryBannerOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset D9617H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main15cGalleryOptions13ImagesOptionsMFC4main21cGalleryImagesOptionsZv (void
main.cGalleryOptions.ImagesOptions(main.cGalleryImagesOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset DA4C2H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main15cGalleryOptions16ThumbnailOptionsMFC4main24cGalleryThumbnailOptionsZv
(void main.cGalleryOptions.ThumbnailOptions(main.cGalleryThumbnailOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset DB36FH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main15cGalleryOptions18CustomColorOptionsMFC4main26cGallery
ustomColorOptionsZv (void
main.cGalleryOptions.CustomColorOptions(main.cGalleryCustomColorOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset DC219H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main15cGalleryOptions15SecurityOptionsMFC4main23cGallerySecurityOptionsZv
(void main.cGalleryOptions.SecurityOptions(main.cGallerySecurityOptions))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F078FH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions15BackgroundColorMFC4main9cRGBColorZv (void
main.cGalleryCustomColorOptions.BackgroundColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F163CH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions11BannerColorMFC4main9cRGBColorZv (void
main.cGalleryCustomColorOptions.BannerColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F24EAH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions9TextColorMFC4main9cRGBColorZv 
(void main.cGalleryCustomColorOptions.TextColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F2F87H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions15ActiveLinkColorMFC4main9cRGBColorZv (void
main.cGalleryCustomColorOptions.ActiveLinkColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset DD179H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions9LinkColorMFC4main9cRGBColorZv 
(void main.cGalleryCustomColorOptions.LinkColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F4CF2H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main26cGalleryCustomColorOptions16VisitedLinkColorMFC4main9cRGBColorZv (void
main.cGalleryCustomColorOptions.VisitedLinkColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset F8B4AH 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main23cGallerySecurityOptions9TextColorMFC4main9cRGBColorZv 
(void main.cGallerySecurityOptions.TextColor(main.cRGBColor))
Win32\Debug DMD\ConsoleApp1.obj(ConsoleApp1)  Offset 08935H 
Record Type 00C3
  Error 1: Previous Definition Different : 
_D4main22cPicturePackageOptions9TextColorMFC4main9cRGBColorZv 
(void main.cPicturePackageOptions.TextColor(main.cRGBColor))
Error: linker exited with status 24


for x64:

ConsoleApp1.obj : fatal error LNK1179: invalid or corrupt file: 
duplicate COMDAT 
'_D4main12cApplication15ForegroundColorMFC4main11cSolidColorZv 
(void main.cApplication.ForegroundColor(main.cSolidColor))'


This is a blocker because ldc crashes during execution and I 
can't figure out why. (seems to be an incompatibility with VS 
2017) So I cannot do much with all the hard work I've put in to 
getting the code generated. (which has been twice as long because 
I had to convert it to runtime code from ctfe since ctfe is broke 
too)
Apr 18 2017
next sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
Nierjerson wrote:

 Major optilink bugs, blocker.
not at optlink bug.
Apr 18 2017
prev sibling parent reply Stefan Koch <uplink.coder googlemail.com> writes:
On Wednesday, 19 April 2017 at 03:52:54 UTC, Nierjerson wrote:
 Major optilink bugs, blocker. Code is long but demonstrates the 
 issue. Compiles with ldc.

 [...]
There are two instances of void ForegroundColor(cSolidColor rhs)
Apr 18 2017
parent reply Nierjerson <Nierjerson somewhere.com> writes:
On Wednesday, 19 April 2017 at 04:25:40 UTC, Stefan Koch wrote:
 On Wednesday, 19 April 2017 at 03:52:54 UTC, Nierjerson wrote:
 Major optilink bugs, blocker. Code is long but demonstrates 
 the issue. Compiles with ldc.

 [...]
There are two instances of void ForegroundColor(cSolidColor rhs)
Well, that could be a problem with the code, but it does compile with LDC so LDC then has an issue or dmd/optilink has the issue. Something is wrong. But, I guess removing the duplicates should at least allow dmd to compile the code.
Apr 19 2017
parent Temtaime <temtaime gmail.com> writes:
On Wednesday, 19 April 2017 at 15:15:21 UTC, Nierjerson wrote:
 On Wednesday, 19 April 2017 at 04:25:40 UTC, Stefan Koch wrote:
 On Wednesday, 19 April 2017 at 03:52:54 UTC, Nierjerson wrote:
 Major optilink bugs, blocker. Code is long but demonstrates 
 the issue. Compiles with ldc.

 [...]
There are two instances of void ForegroundColor(cSolidColor rhs)
Well, that could be a problem with the code, but it does compile with LDC so LDC then has an issue or dmd/optilink has the issue. Something is wrong. But, I guess removing the duplicates should at least allow dmd to compile the code.
DMD compiles the code too. The code doesn't link. Optlink forbids duplicates, but ldc uses msvc link and it allows them(as i remember, it shows a warning).
Apr 19 2017