mingw build fails with function 'mozilla::PrintfTarget::PrintfTarget()' definition is marked dllimport

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: tjr, Assigned: tjr)

Tracking

(Blocks: 1 bug)

Trunk
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 wontfix, firefox55 fixed)

Details

(Whiteboard: [tor])

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
error: function 'mozilla::PrintfTarget::PrintfTarget()' definition is marked dllimport

It seems mingw must be pickier than our other compilers, as it doesn't like the declaration and the definition in the .h file. Moving it to the cpp works though.
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Whiteboard: [tor]
(Assignee)

Updated

2 years ago
Attachment #8844085 - Flags: review?(ttromey)
(Assignee)

Updated

2 years ago
Blocks: 1331349

Comment 2

2 years ago
mozreview-review
Comment on attachment 8844085 [details]
Bug 1344809 Move function definition to cpp to fix mingw 'definition is marked dllimport' error

https://reviewboard.mozilla.org/r/117622/#review119420

I don't think I can approve changes here, but I do think this is reasonable.
I suggest requesting review from :froydnj instead.
Attachment #8844085 - Flags: review?(ttromey)
(Assignee)

Comment 3

2 years ago
Hey Nathan, when you unbury yourself could you take a look at this? Thanks!
Flags: needinfo?(nfroyd)

Comment 4

2 years ago
mozreview-review
Comment on attachment 8844085 [details]
Bug 1344809 Move function definition to cpp to fix mingw 'definition is marked dllimport' error

https://reviewboard.mozilla.org/r/117622/#review121494

Thanks!

::: mozglue/misc/Printf.cpp:540
(Diff revision 1)
>      }
>  
>      return true;
>  }
>  
> +mozilla::PrintfTarget::PrintfTarget() : mEmitted(0)

Nit: Please format this like so:

mozilla::PrintfTarget::PrintfTarget()
  : mEmitted(0)
{
}
Attachment #8844085 - Flags: review+
Flags: needinfo?(nfroyd)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 6

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/58feb843a9ae
Move function definition to cpp to fix mingw 'definition is marked dllimport' error r=froydnj
Keywords: checkin-needed

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/58feb843a9ae
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
status-firefox54: affected → wontfix
You need to log in before you can comment on or make changes to this bug.