Bonjour,
j'ai donc réussit à compiler les composant asphyre dans C++Builder en modifiant beaucoup de fichiers pour les rendre compatible mais j'ai maintenant une erreur que je ne comprend pas. J'ai obtenu tous les composants et donc pu compiler les fichiers pas. Ce qui m'a permis d'obtenir des fichiers include en hpp. Seulement, des parties des fichiers include ne correspondent pas aux fichiers pas.

Par exemple le code suivant du fichier pas : (le fichier n'est pas entier, je n'ai mis que ce qui est pertinent)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
interface
 
//---------------------------------------------------------------------------
uses
 Types, Classes, SysUtils, AsphyreDef;
 
//---------------------------------------------------------------------------
type
 TAsphyreSubscriber = class;
 
//---------------------------------------------------------------------------
 TAsphyrePublisherClass = class of TAsphyrePublisher;
 
//---------------------------------------------------------------------------
 TAsphyrePublisher = class(TComponent)
 private
  Data: array of TAsphyreSubscriber;
 protected
  procedure Subscribe(Obj: TAsphyreSubscriber);
  procedure Unsubscribe(Obj: TAsphyreSubscriber);
  function FindSubscriber(Obj: TAsphyreSubscriber): Integer;
 
  function Notify(Msg: Cardinal): Boolean;
 public
 
  constructor Create(AOwner: TComponent); override;
  destructor Destroy(); override;
 end;
 
//---------------------------------------------------------------------------
 TAsphyreSubscriber = class(TComponent)
 private
  FPublisher: TAsphyrePublisher;
 
  procedure SetPublisher(const Value: TAsphyrePublisher);
  procedure SearchForPublisher();
 protected
  function HandleNotice(Msg: Cardinal): Boolean; virtual;
  function PublisherClass(): TAsphyrePublisherClass; virtual;
 
  procedure Notification(AComponent: TComponent;
   Operation: TOperation); override;
 public
 
  constructor Create(AOwner: TComponent); override;
  destructor Destroy(); override;
 published
  property Publisher: TAsphyrePublisher read FPublisher write SetPublisher;
 end;
 
//---------------------------------------------------------------------------
donne le ficheir hpp suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved
 
// (DO NOT EDIT: machine generated header) 'AsphyreSubsc.pas' rev: 6.00
 
#ifndef AsphyreSubscHPP
#define AsphyreSubscHPP
 
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <AsphyreDef.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit
 
//-- user supplied -----------------------------------------------------------
 
namespace Asphyresubsc
{
//-- type declarations -------------------------------------------------------
typedef TMetaClass*TAsphyrePublisherClass;
 
typedef DynamicArray<TAsphyreSubscriber* >  AsphyreSubsc__2; //l'erreur est ici
 
class DELPHICLASS TAsphyrePublisher;
class DELPHICLASS TAsphyreSubscriber;
class PASCALIMPLEMENTATION TAsphyrePublisher : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
 
private:
	DynamicArray<TAsphyreSubscriber* >  Data;
 
protected:
	void __fastcall Subscribe(TAsphyreSubscriber* Obj);
	void __fastcall Unsubscribe(TAsphyreSubscriber* Obj);
	int __fastcall FindSubscriber(TAsphyreSubscriber* Obj);
	bool __fastcall Notify(unsigned Msg);
 
public:
	__fastcall virtual TAsphyrePublisher(Classes::TComponent* AOwner);
	__fastcall virtual ~TAsphyrePublisher(void);
};
 
 
class PASCALIMPLEMENTATION TAsphyreSubscriber : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
 
private:
	TAsphyrePublisher* FPublisher;
	void __fastcall SetPublisher(const TAsphyrePublisher* Value);
	void __fastcall SearchForPublisher(void);
 
protected:
	virtual bool __fastcall HandleNotice(unsigned Msg);
	virtual TMetaClass* __fastcall PublisherClass(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
 
public:
	__fastcall virtual TAsphyreSubscriber(Classes::TComponent* AOwner);
	__fastcall virtual ~TAsphyreSubscriber(void);
 
__published:
	__property TAsphyrePublisher* Publisher = {read=FPublisher, write=SetPublisher};
};
 
 
//-- var, const, procedure ---------------------------------------------------
 
}	/* namespace Asphyresubsc */
using namespace Asphyresubsc;
#pragma option pop	// -w-
#pragma option pop	// -Vx
 
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AsphyreSubsc
j'ai indiqué où est l'erreur. Il déclare quelques chose qui n'est pas dans le fichier pas. J'ai fait une recherche dans l'ensemble des fichiers et "AsphyreSubsc__2" n'existe que dans ce fichier hpp. D'où vient-il et commant faire pour s'en débarasser? Parce que même si je déplace la ligne un peu plus bas (pour qu'il puisse l'utiliser) ou si je la supprime, le fichier est regénérer à chaque fois que je recompile les composants pour rajouter des modules ou des fonctions.

Et j'ai un autre problème dans un autre fichier.
dans un hpp j'ai :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
typedef _DIACTIONA *PDIActionA;
 
typedef _DIACTIONW *PDIActionW;
 
typedef _DIACTIONA *PDIAction;
 
typedef _DIACTIONA  TDIActionA;
 
typedef _DIACTIONW  TDIActionW;
 
typedef _DIACTIONA  TDIAction;
sachant qu'il ne déclare jamais _DIACTIONA ou _DIACTIONW
et voici la partie du pas qui a autogénérer de hpp :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{$IFDEF DIRECTINPUT_VERSION_8} (* #if(DIRECTINPUT_VERSION > 0x0700) *)
 
type
  PDIActionA = ^TDIActionA;
  PDIActionW = ^TDIActionW;
  PDIAction = PDIActionA;
  _DIACTIONA = packed record
    uAppData: Pointer;
    dwSemantic: DWORD;
    dwFlags: DWORD;
    case Byte of
      0: (
        lptszActionName: PAnsiChar;
        guidInstance: TGUID;
        dwObjID: DWORD;
        dwHow: DWORD;
       );
      1: (
        uResIdString: LongWord;
      );
  end;
  {$EXTERNALSYM _DIACTIONA}
  _DIACTIONW = packed record
    uAppData: Pointer;
    dwSemantic: DWORD;
    dwFlags: DWORD;
    case Byte of
      0: (
        lptszActionName: PWideChar;
        guidInstance: TGUID;
        dwObjID: DWORD;
        dwHow: DWORD;
       );
      1: (
        uResIdString: LongWord;
      );
  end;
  {$EXTERNALSYM _DIACTIONW}
  _DIACTION = _DIACTIONA;
  {$EXTERNALSYM _DIACTION}
  DIACTIONA = _DIACTIONA;
  {$EXTERNALSYM DIACTIONA}
  DIACTIONW = _DIACTIONW;
  {$EXTERNALSYM DIACTIONW}
  DIACTION = DIACTIONA;
  {$EXTERNALSYM DIACTION}
  TDIActionA = _DIACTIONA;
  TDIActionW = _DIACTIONW;
  TDIAction = TDIActionA;
Une idée?
Merci d'avance