Closed Bug 1344809 Opened 3 years ago Closed 3 years ago

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

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tor])

Attachments

(1 file)

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 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)
Hey Nathan, when you unbury yourself could you take a look at this? Thanks!
Flags: needinfo?(nfroyd)
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)
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
https://hg.mozilla.org/mozilla-central/rev/58feb843a9ae
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.