Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 06, 2004 DLL problem | ||||
---|---|---|---|---|
| ||||
Hi, I'm trying to compile some foreign code and get the following error messages. What's the problem with dllimport here? /* * Implementation of e4_CommonUniqueID. */ e4_CommonUniqueID::e4_CommonUniqueID() : ^ e4id.cpp(39) : Error: initializer or function body for dllimport not allowed e4_CommonUniqueID::e4_CommonUniqueID() : ID(-1), SP(0) {} e4_CommonUniqueID::e4_CommonUniqueID(const e4_CommonUniqueID &referrer) : ^ e4id.cpp(42) : Error: initializer or function body for dllimport not allowed : ID(referrer.ID), SP(referrer.SP) { } e4_CommonUniqueID::e4_CommonUniqueID(int uid, int usp) : ^ e4id.cpp(48) : Error: initializer or function body for dllimport not allowed : ID(uid), SP(usp) { } e4_CommonUniqueID & e4_CommonUniqueID::operator=(const e4_CommonUniqueID &referrer) { ^ e4id.cpp(55) : Error: initializer or function body for dllimport not allowed { ID = referrer.ID; SP = referrer.SP; return *this; } e4_CommonUniqueID::~e4_CommonUniqueID() {} ^ e4id.cpp(62) : Error: initializer or function body for dllimport not allowed -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de |
November 08, 2004 Re: DLL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert M. Münch | Importing a function means referring to that function in some other DLL. Therefore, providing a definition of an import (rather than just a declaration) must be an error. "Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:opsg1yp5h5heztw6@news.digitalmars.com... > Hi, I'm trying to compile some foreign code and get the following error messages. What's the problem with dllimport here? > > /* > * Implementation of e4_CommonUniqueID. > */ > > e4_CommonUniqueID::e4_CommonUniqueID() : > ^ > e4id.cpp(39) : Error: initializer or function body for dllimport not > allowed > > e4_CommonUniqueID::e4_CommonUniqueID() : ID(-1), SP(0) {} > > e4_CommonUniqueID::e4_CommonUniqueID(const e4_CommonUniqueID &referrer) > : > ^ > e4id.cpp(42) : Error: initializer or function body for dllimport not > allowed > > : ID(referrer.ID), > SP(referrer.SP) > { > } > > e4_CommonUniqueID::e4_CommonUniqueID(int uid, int usp) > : > ^ > e4id.cpp(48) : Error: initializer or function body for dllimport not > allowed > > : ID(uid), > SP(usp) > { > } > > e4_CommonUniqueID & > e4_CommonUniqueID::operator=(const e4_CommonUniqueID &referrer) > { > ^ > e4id.cpp(55) : Error: initializer or function body for dllimport not > allowed > > { > ID = referrer.ID; > SP = referrer.SP; > > return *this; > } > > e4_CommonUniqueID::~e4_CommonUniqueID() {} > ^ > e4id.cpp(62) : Error: initializer or function body for dllimport not > allowed > > > -- > Robert M. Münch > Management & IT Freelancer > http://www.robertmuench.de |
November 09, 2004 Re: DLL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Sun, 7 Nov 2004 19:51:48 -0800, Walter <newshound@digitalmars.com> wrote: > Importing a function means referring to that function in some other DLL. > Therefore, providing a definition of an import (rather than just a > declaration) must be an error. Ah, I see. Ok, thanks. I was irritated in that there was an implementation but didn't saw the DLL thing... Thanks. BTW: I try to post into the c++.windows group which fails. Is this group no longer existant? -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de |
November 11, 2004 Re: DLL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert M. Münch | "Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:opsg7e7hmrheztw6@news.digitalmars.com... > BTW: I try to post into the c++.windows group which fails. Is this group no longer existant? You're posting in it now! |
November 11, 2004 Re: DLL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Wed, 10 Nov 2004 17:25:09 -0800, Walter <newshound@digitalmars.com> wrote:
>> BTW: I try to post into the c++.windows group which fails. Is this group
>> no longer existant?
>
> You're posting in it now!
Oh, yeah. I meant c++.command-line Sorry. Robert
|
Copyright © 1999-2021 by the D Language Foundation