www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Redundant typedefs allowed?

↑ ↓ ← Peter Heckert <peter.heckert arcor.de> writes:
Hi,

I get an error while trying to port a photoshop pluging from msvc to sc:

sc ..\..\..\COMMON\SOURCES\WinFileUtils.cpp -Jm -Ae -mn -C -WD -S -5 -a8 
-c -w- -w5 -w6 -w7 -gh -D_DEBUG -DWIN32 -D_WINDOWS -DMSWindows=1 
-Ie:\pssdk\photoshopapi\pica_sp -Ie:\pssdk\photoshopapi\photoshop 
-I..\Common -I..\..\..\Common\includes -I..\..\..\Co
Error: 
E:\pssdk\samplecode\filter\propetizer\win\..\..\..\Common\includes
WinFileUtils.h(43): 
'SFReply' previously declared as something else
E:\pssdk\samplecode\filter\propetizer\win\..\..\..\Common\includes
WinFileUtils.h(43): 
It was declared as: SFReply
E:\pssdk\samplecode\filter\propetizer\win\..\..\..\Common\includes
WinFileUtils.h(43): 
It is now declared: __unnamed
Lines Processed: 925779  Errors: 1  Warnings: 0
Build failed


#include "PITypes.h"
#include "PIUtilities.h"

/***************************************************************/

#if MSWindows
typedef	HFILE	FileHandle;
typedef Handle	AliasHandle;
typedef struct
	{	
	char fileName [256];
	} SFReply;

The type "SFReply" is also defined in "PITypes.h" in identical form:

	typedef struct
	{	
		char fileName [256];
	
	} SFReply;

Compiler version is 8.42n

Normally this re-declaration should be allowed (so far I know)

Anyway, DMC is great..

Peter
Jul 18 2006
↑ ↓ → Peter Heckert <peter.heckert arcor.de> writes:
Peter Heckert schrieb:

Never mind. Working around is easy and double-declaration is poor style 
anyway...
As an excuse: the sdk was written by Adobe, it's not my work ;-)


 Normally this re-declaration should be allowed (so far I know)
 
 Anyway, DMC is great..
 
 Peter

Jul 20 2006