Thread: question about .net to 6.0 change causing errors

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905

    question about .net to 6.0 change causing errors

    first time i've asked a question about code in a while but i'm absolutely stumped. Here's the problem. I made my programming language, OpenScript2.0 in .net, ok? Well, about 3 weeks ago, i had to reinstall the OS on my puter about 7 times, because i tried upgrading to XP-pro, but it ended up not working on my puter, all the drivers were going crazy and i kept getting BSOD's all over the place, but that's not the problem, the problem is that when i did that, all of the programs that WERE installed on my puter, became "uninstalled", even though they're still there (cuz the registry got wiped and my system32 folder got reset). So, now, I can't use .net because it's a giant ........ant and won't work if it can't find it's stupid components, but i can still use c++ 6.0, because I have that actually on CD. (I don't have a .net cd...*sob*). But now, when i try to compile OpenScript2.0, I get all of these errors that i've never gotten before:

    Code:
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(218) : error C2629: unexpected 'class ATL::CTempBuffer<T,t_nFixedBytes,Allocator> ('
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(218) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(242) : error C2143: syntax error : missing ')' before '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(242) : error C2143: syntax error : missing ';' before '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(242) : error C2059: syntax error : '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(242) : error C2059: syntax error : ')'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(243) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(247) : error C2143: syntax error : missing ')' before '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(247) : error C2143: syntax error : missing ';' before '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(247) : error C2059: syntax error : '...'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(247) : error C2059: syntax error : ')'
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(248) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(291) : error C2485: 'noinline' : unrecognized extended attribute
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(301) : error C2485: 'noinline' : unrecognized extended attribute
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(311) : error C2485: 'noinline' : unrecognized extended attribute
            C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(319) : see reference to class template instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being compiled
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(344) : error C2065: '_resetstkoflw' : undeclared identifier
    C:\Microsoft Visual Studio\VC98\INCLUDE\atlalloc.h(400) : fatal error C1506: unrecoverable block scoping error
    and that happens in EVERY single file that i try to compile. I don't understand why this would be happening, and I'm sorry, but I can't post code because there's 10K lines of code, and the errors are being generated in atlalloc.h, so i don't know what's going on. What i'm *guessing* is going on is that c++ 6.0 is compiling with the older header files and for some reason isn't working (which doesn't make sense)......so anyone have any ideas as to how i can fix this problem?

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    To me it sounds like VC6 doesn't like your code, but thats all I could think of. I've never had any problems with .NET or VC6 of this sort. Because if it compiled correctly before, I could see no other reason why this would arise.
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  3. #3
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    From what I've heard, the VC++ compiler is broken, and has an enormous amount of bugs when working with templates.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by -=SoKrA=-
    From what I've heard, the VC++ compiler is broken, and has an enormous amount of bugs when working with templates.
    VC++6 - yeah...it's pretty old now

    VC++.Net is better and (so I'm told) VC++.Net2003 is very good

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >VC++.Net is better and (so I'm told) VC++.Net2003 is very good
    Yes it is, .NET is one of the better compilers now.
    My best code is written with the delete key.

  6. #6
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    >Yes it is, .NET is one of the better compilers now.
    Yes I haven't seen any problems with .net, although...VC6 is another story.
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  7. #7
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    wow, tell me something i didn't know, lmao. The question was, do you know any way i can fix this? not which compiler you think is better

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >tell me something i didn't know, lmao
    Okay. VC++ 6 doesn't handle templates well, so your code is probably too advanced for its simple-minded parsing. There's no way to fix your problem without using a better compiler. Of course, had you been following the thread instead of just assuming it was off-topic, that would have been something you did know.

    >The question was, do you know any way i can fix this?
    The answer was, VC++ 6 sucks. If we had an example of code that causes the problem then we might be able to help you with a workaround. But since you didn't post anything because "the code is too long", not realizing that any example that exhbits the problem will be enough, we can't help any more than that.

    >not which compiler you think is better
    Well, when our opinion of compilers is directly relevant to your problem...
    My best code is written with the delete key.

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Code:
    template <class Key, class T, class Pred, class Store>
    class Btree
    {
       class BtreeIterator
       {
          typedef BtreeIterator<Btree<Key, T, Pred, Store>> iterator;
    You mean the error I get:

    missing ; before <

    pointing to the last line above may be the compilers problem and not my syntax? Is there any way for me to know when VC++ is coughing and when my syntax is erroneous? The syntax for templates is so convoluted that I generally believe the compiler, but sometimes I swear my syntax is correct, even though the compiler rejects it.

  10. #10
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >pointing to the last line above may be the compilers problem and not my syntax?
    No, because your syntax is wrong. Usually it's best to trust the compiler unless testing suggests otherwise. For example, if I have a template problem in VC++ 6 but the code works fine in VC++ .NET, Borland C++ 6 and G++, I'll assume that the problem is due to VC++ 6's problems because that makes more sense than assuming my code is wrong when three of the top compilers accept it without complaint yet the known poor compiler doesn't.
    My best code is written with the delete key.

  11. #11
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    yah, i had noticed what you said about vc6.0, hmm, so i guess there's no way to fix it unless i get .net or something. That sucks cuz now i can't work on OpenScript2.0 anymore without rewriting everything to work in 6.0 (and about posting code, like i said, the error isn't in my code, there error gets generated from an atlalloc.h file in the includes directory, so i thought maybe it was just because it was an older version....?)

  12. #12
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    I would suggest you don't argue with Prelude She always wins.

    What I would suggest(if you purchased .net), go on some IRC networks and get an xdcc of .net.. http://www.packetnews.com/ Since you own the product there shouldn't be a violation(up to you whether you rip MS off or not)..and you prolly know all that legal stuff..but ya.

    If not that somehow get .net, or rewrite those header files(if you know how).
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  13. #13
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Ya, I kinda figured the syntax as posted would be wrong, because I just rattled off the code and the error statement fom memory without the benefit of the actual code/error statements I'm working with with me at this time. I can fix most of the errors I encounter, but the error statements I get regarding template syntax seem a fair amount more complex than those I've encountered before using templates, and my grasp of templates isn't all solid to begin with. Then to read that issues of templates can be a sore spot for the compiler, too, just raised some hope that maybe, just maybe, not all of the problems are mine, though I realize most of them are. Thanks for the reality check, however.

  14. #14
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >so i thought maybe it was just because it was an older version....?
    That's precisely why.

    >but the error statements I get regarding template syntax seem a fair amount more complex
    It's all in the name. Errors and warnings will give you the full name of a template, which can be thousands of characters. The error is near the end. In the case of the code that you gave, the problem was that BtreeIterator isn't a template class. Even if it were, there would still be an error in the >> part of the template. Because of the greedy parsing C++ uses, that is viewed as a single token, in this case the right shift operator. Since the right shift operator makes no sense in that context, an error is flagged.
    My best code is written with the delete key.

  15. #15
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    so shouldn't pointing to the .net include directory fix the problem?

    -edit-
    ok, nevermind, pointing to the newer includes didn't fix anything, they're basically the same files, so it still comes up with the exact same errors. It's definitely the compiler then, and i guess there's no way around it *sob*
    Last edited by jverkoey; 03-22-2004 at 10:23 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assembly amature question: prog errors
    By geek@02 in forum Tech Board
    Replies: 1
    Last Post: 10-03-2008, 01:35 PM
  2. VC++ 6.0 to .net problems
    By bibiteinfo in forum C++ Programming
    Replies: 14
    Last Post: 02-02-2006, 10:59 AM
  3. VS .NET & XP Pro Question
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-08-2003, 01:07 PM
  4. Port C++ .NET Project back C++ 6.0 :: Visual Studio
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 11-17-2002, 01:11 PM
  5. Replies: 3
    Last Post: 05-18-2002, 07:19 AM