I'm creating a standard library of functions for a programming language I'm creating. However, my compiler (Visual C++ 2008) refuses to compile. I use one namespace, "System".
The compiler gives me the following errors:
error C2871: 'System' : a namespace with this name does not exist
error C2065: 'gcnew' : undeclared identifier
'System' : is not a class or namespace name
The rest of the errors are because of this, i.e. undeclared identifiers or whatever.
I had originally started this project as a static library, but then scrapped the idea and just changed it into a regular header. I changed my compiler settings to fit this, but it refused to do anything, so I wiped out the project and kept the code, then made a completely new project, and it still didn't work. Can someone help me?
Compiler refuses to work
Started by dargueta, Jan 20 2008 04:09 PM
2 replies to this topic
#1
Posted 20 January 2008 - 04:09 PM
|
|
|
#2
Guest_Jordan_*
Posted 22 January 2008 - 05:26 AM
Guest_Jordan_*
Try to compile it with the /clr (Common Language Runtime Support) enabled. Right click solution, configuration properties, select general, and select CLR.
#3
Posted 22 January 2008 - 07:27 PM
That fixed the 102 errors I was getting, but it made the problem worse because now it's complaining about a system header (servprov.h). I get the following errors:
error C2872: 'IServiceProvider' : ambiguous symbol
could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(53) : System::IServiceProvider IServiceProvider'
or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
error C3699: '*' : cannot use this indirection on type 'IServiceProvider'; compiler replacing '*' with '^' to continue parsing
...and so on. I tried each of the CLR options, and /CLR was the one with the least number of errors. /CLR:pure , /CLR:safe , and /CLR:oldSyntax didn't help any.
error C2872: 'IServiceProvider' : ambiguous symbol
could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(53) : System::IServiceProvider IServiceProvider'
or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
error C3699: '*' : cannot use this indirection on type 'IServiceProvider'; compiler replacing '*' with '^' to continue parsing
...and so on. I tried each of the CLR options, and /CLR was the one with the least number of errors. /CLR:pure , /CLR:safe , and /CLR:oldSyntax didn't help any.


Sign In
Create Account

Back to top









