[program-l] Re: C++ linker question

  • From: Jaffar Sidek <jaffar.sidek10@xxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Sun, 26 Feb 2017 22:56:55 +0800

Do your two functions contain the same structure definitions?


On 2/26/2017 7:58 PM, Mike Fox wrote:

Hey what's up guys,

I've got 2 functions with the same name, but in different namespaces; this is part of a DLL I'm creating. And as always, the good old linker throws me yet another wacky curveball... the functions are already defined. This would make perfect sense, had I not used namespaces (i.e. 2 functions named Foo is an obvious error); but because it's A::Foo and B::Foo this doesn't make sense... at least not from a human perspective. *smile*

Anyway, one obvious fix to the problem would be to rename the functions in B, which I'll do if there's just no other way, but I'd sure like to know more about this and haven't been able to fish up much from Google. Any thoughts?

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: