Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

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.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-2008, 07:09 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Compiler refuses to work

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-22-2008, 08:26 AM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,674
Last Blog:
PHP Objects, Patterns,...
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-22-2008, 10:27 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

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


All times are GMT -5. The time now is 11:22 AM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads