|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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? |
| Sponsored Links |
|
|
|
|||||
|
Try to compile it with the /clr (Common Language Runtime Support) enabled. Right click solution, configuration properties, select general, and select CLR.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
|
|||
|
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\msc orlib.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. Last edited by dargueta; 01-22-2008 at 10:29 PM. Reason: Smilies got in there somehow |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiler option for FLAT address compilation of pointers | tumstech | C and C++ | 1 | 11-23-2007 11:11 AM |
| C++ Compiler | CPlusPlus | C and C++ | 5 | 08-20-2007 12:56 AM |
| asking for opensource compiler. | fire exit | General Programming | 1 | 08-02-2007 08:46 AM |
| Why this does'nt work? | zen_aegean | Website Design | 4 | 07-23-2006 07:07 AM |
| Color in ComboBox doesn't work | Crane | C# Programming | 3 | 07-09-2006 07:48 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |