[Insight-users] Namespaces Problem

martin.garcia@epfl.ch martin . garcia at epfl . ch
Wed, 21 Aug 2002 14:25:57 +0200


This message is in MIME format.

---MOQ10299327574042ebb5227359a39e9c9b48f17e3b7b
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Here you have the files, I think there is no namespace definition in my project.



> Hi Martin,
> 
> We just tried jour code snippet.
> 
> It works fine when the includes:
> 
>    #include "stdafx.h"
>    #include "osirislight.h"
>    #include "VtkItkConnector.h"
> 
> are commented out.
> 
> There should be a wrong usage of
> namespaces inside one of these files.
> 
> Could you please post those files ?
> or at least verify the namespaces
> are used correctly inside.
> 
> One common error is to declare a namespace
> and let it open (e.g. miss the closing bracket)
> 
> like:
> 
> namespace  MyOpenNamespace {
> 
> ///....
> 
> // unmatching  -> }
> 
> 
> 
> ----
> 
> Please find attached the CMakeList.txt file
> and the variation of your code that we tested
> here.
> 
> Thanks,
> 
> 
> Luis
> 
> 
> =====================================
> 
> martin.garcia@epfl.ch wrote:
> > Hi ,
> > 
> > I'm working with VC++6.0 (sp 6), and I'm trying to integrate itk 
> > functionalities to my project, but when I use namespaces, I always have the
> 
> > following compilation error
> > 
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

---MOQ10299327574042ebb5227359a39e9c9b48f17e3b7b
Content-Type: text/plain; name="OsirisLight.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="OsirisLight.h"

Ly8gT3NpcmlzTGlnaHQuaCA6IG1haW4gaGVhZGVyIGZpbGUgZm9yIHRoZSBPU0lSSVNMSUdIVCBh
cHBsaWNhdGlvbg0KLy8NCg0KI2lmICFkZWZpbmVkKEFGWF9PU0lSSVNMSUdIVF9IX18xNDJEQUMy
MV9EQTBEXzRERjNfQUQzNl84QjJFMTU2OTc1NEZfX0lOQ0xVREVEXykNCiNkZWZpbmUgQUZYX09T
SVJJU0xJR0hUX0hfXzE0MkRBQzIxX0RBMERfNERGM19BRDM2XzhCMkUxNTY5NzU0Rl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dXQoKTsNCglhZnhfbXNnIHZvaWQgT25GaWxlT3Bl
bigpOw0KCS8vfX1BRlhfTVNHDQoNCglERUNMQVJFX01FU1NBR0VfTUFQKCkNCg0KcHVibGljOiAN
CglDM0R2dGtEb2MqCQkJQ3JlYXRlM0R2dGtEb2N1bWVudCggQzNEdnRrT2JqZWN0ICpwM0R2dGtP
YmplY3QsIEJPT0wgYlRyaWFuZ3VsYXRlID0gVFJVRSApOw0KCXZvaWQJCQkJU2V0Q3VycmVudERv
Y3VtZW50KCBMUFZPSUQgcERvYyApIHsgbV9wQ3VycmVudERvYyA9IHBEb2M7IH0NCglMUFZPSUQJ
CQkJR2V0Q3VycmVudERvY3VtZW50KCkgeyByZXR1cm4gbV9wQ3VycmVudERvYzsgfQ0KcHJpdmF0
ZToNCglMUFZPSUQJCQkJbV9wQ3VycmVudERvYzsNCn07DQoNCg0KLy8vLy8vLy8vLy8vLy8vLy8v
Ly8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8v
Ly8NCg0KLy97e0FGWF9JTlNFUlRfTE9DQVRJT059fQ0KLy8gTWljcm9zb2Z0IFZpc3VhbCBDKysg
d2lsbCBpbnNlcnQgYWRkaXRpb25hbCBkZWNsYXJhdGlvbnMgaW1tZWRpYXRlbHkgYmVmb3JlIHRo
ZSBwcmV2aW91cyBsaW5lLg0KDQojZW5kaWYgLy8gIWRlZmluZWQoQUZYX09TSVJJU0xJR0hUX0hf
XzE0MkRBQzIxX0RBMERfNERGM19BRDM2XzhCMkUxNTY5NzU0Rl9fSU5DTFVERURfKQ0K

---MOQ10299327574042ebb5227359a39e9c9b48f17e3b7b
Content-Type: text/plain; name="StdAfx.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="StdAfx.h"

Ly8gc3RkYWZ4LmggOiBpbmNsdWRlIGZpbGUgZm9yIHN0YW5kYXJkIHN5c3RlbSBpbmNsdWRlIGZp
bGVzLA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NaWNyb3NvZnQgVmlzdWFsIEMrKyB3aWxsIGlu
c2VydCBhZGRpdGlvbmFsIGRlY2xhcmF0aW9ucyBpbW1lZGlhdGVseSBiZWZvcmUgdGhlIHByZXZp
b3VzIGxpbmUuDQoNCiNlbmRpZiAvLyAhZGVmaW5lZChBRlhfU1REQUZYX0hfX0I3RkY0MjNBX0Qz
OTlfNDYyQ19BNjMzXzUyRDkxMEQzRDJENV9fSU5DTFVERURfKQ0K

---MOQ10299327574042ebb5227359a39e9c9b48f17e3b7b
Content-Type: text/plain; name="VtkItkConnector.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="VtkItkConnector.h"

Ly8gVnRrSXRrQ29ubmVjdG9yLmg6IGludGVyZmFjZSBmb3IgdGhlIENWdGtJdGtDb25uZWN0b3Ig
Y2xhc3MuDQovLw0KLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8v
Ly8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLw0KDQojaWYgIWRlZmluZWQoQUZYX1ZUS0lUS0NPTk5F
Q1RPUl9IX18yNUM0RDE3OV85ODI3XzRFMzNfOEQyMV8xREI0ODY0NjQ1RjBfX0lOQ0xVREVEXykN
CiNkZWZpbmUgQUZYX1ZUS0lUS0NPTk5FQ1RPUl9IX18yNUM0RDE3OV85ODI3XzRFMzNfOEQyMV8x
REI0ODY0NjQ1RjBfX0lOQ0xVREVEXw0KDQojaWYgX01TQ19WRVIgPiAxMDAwDQojcHJhZ21hIG9u
Y2UNCiNlbmRpZiAvLyBfTVNDX1ZFUiA+IDEwMDANCg0KY2xhc3MgQ1Z0a0l0a0Nvbm5lY3RvciAg
DQp7DQpwdWJsaWM6DQoJdnRrSW1hZ2VEYXRhKiBtX3BJbWFnZURhdGE7DQoJQ1Z0a0l0a0Nvbm5l
Y3Rvcih2dGtJbWFnZURhdGEqIGRhdGEpOw0KCXZpcnR1YWwgfkNWdGtJdGtDb25uZWN0b3I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