AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi's Interfaces in C++

Ein Thema von Desmulator · begonnen am 1. Jun 2009 · letzter Beitrag vom 1. Jun 2009
 
Benutzerbild von Desmulator
Desmulator

Registriert seit: 3. Mai 2007
Ort: Bonn
169 Beiträge
 
#7

Re: Delphi's Interfaces in C++

  Alt 1. Jun 2009, 11:04
Okay.

Code:
class IBaseInterface: public IUnknown
{
    virtual __stdcall void* GetHandle() = 0;
};

extern "C" {
    ...
    IBaseInterface BaseCreateFileInfo(char* FileName, bool Extended);
}
Zitat:
Compiler: Default compiler
Building Makefile: "C:\Dokumente und Einstellungen\Lars\Desktop\BaseCTest\Makefile.win"
Führt make... aus
make.exe -f "C:\Dokumente und Einstellungen\Lars\Desktop\BaseCTest\Makefile.win" all
g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Programme/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Programme/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Programme/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Programme/Dev-Cpp/include/c++/3.4.2" -I"C:/Programme/Dev-Cpp/include" -I"C:/Dokumente und Einstellungen/Lars/Desktop/BaseCTest" -pg -g3

In file included from main.cpp:2:
C:/Dokumente und Einstellungen/Lars/Desktop/BaseCTest/baseEngine.h:91: error: invalid return type for function `IBaseInterface BaseCreateFileInfo(char*, bool)'
C:/Dokumente und Einstellungen/Lars/Desktop/BaseCTest/baseEngine.h:91: error: because the following virtual functions are abstract:
C:/Programme/Dev-Cpp/include/unknwn.h:27: error: virtual HRESULT IUnknown::QueryInterface(const IID&, void**)
C:/Programme/Dev-Cpp/include/unknwn.h:28: error: virtual ULONG IUnknown::AddRef()
C:/Programme/Dev-Cpp/include/unknwn.h:29: error: virtual ULONG IUnknown::Release()
C:/Dokumente und Einstellungen/Lars/Desktop/BaseCTest/baseEngine.h:74: error: virtual void* IBaseInterface::GetHandle()

main.cpp: In function `int main(int, char**)':

main.cpp:15: error: cannot allocate an object of type `IBaseInterface'
main.cpp:15: error: since type `IBaseInterface' has abstract virtual functions
main.cpp:15: error: cannot allocate an object of type `IBaseInterface'
main.cpp:15: error: since type `IBaseInterface' has abstract virtual functions
main.cpp:15: error: cannot declare variable `Face' to be of type `IBaseInterface'
main.cpp:15: error: since type `IBaseInterface' has abstract virtual functions
Selbst wenn ich das class durch ein interface ersetze bleibt der fehler.
Lars
There are 10 kinds of people in the world:
those who get binary, and those who don’t.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz