Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Unicode errors with VS C++ 6 (aka VS98).  (Read 8141 times)

0 Members and 1 Guest are viewing this topic.

Bonafide

  • Newbie
  • *
  • Posts: 18
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« on: March 03, 2009, 08:29:47 pm »
Hey guys,

My group for my HS group project is having some strange errors attempting to run SFML (specically the "Clock" tutorial under the installation page) on the the crappy school computers which are running VS 6++ (VS98). For some reason, we're getting the following errors:

Code: [Select]

--------------------Configuration: GroupP - Win32 Debug--------------------
Compiling...
Test.cpp
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(82) : error C2535: '__thiscall sf::Unicode::Text::sf::Unicode::Text(const unsigned short *)' : member function already defined or declared
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(80) : see declaration of 'Text::Text'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(86) : error C2629: unexpected 'class sf::Unicode::Text ('
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(86) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(87) : error C2629: unexpected 'class sf::Unicode::Text ('
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(87) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(88) : error C2629: unexpected 'class sf::Unicode::Text ('
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(88) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(98) : error C2027: use of undefined type 'Unicode'
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(45) : see declaration of 'Unicode'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(99) : error C2027: use of undefined type 'Unicode'
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(45) : see declaration of 'Unicode'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(99) : error C2535: '__thiscall sf::Unicode::Text::operator`class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned sho
rt> >'(void) const' : member function already defined or declared
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(97) : see declaration of 'operator`class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >''
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(100) : error C2027: use of undefined type 'Unicode'
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(45) : see declaration of 'Unicode'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(107) : error C2027: use of undefined type 'Unicode'
        c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(45) : see declaration of 'Unicode'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(241) : error C2039: 'size_t' : is not a member of 'std'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(253) : error C2039: 'size_t' : is not a member of 'std'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.hpp(265) : error C2039: 'size_t' : is not a member of 'std'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.inl(422) : error C2039: 'size_t' : is not a member of 'std'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.inl(442) : error C2039: 'size_t' : is not a member of 'std'
c:\program files\microsoft visual studio\vc98\include\sfml\system\unicode.inl(471) : error C2039: 'size_t' : is not a member of 'std'
Error executing cl.exe.

GroupP.exe - 18 error(s), 0 warning(s)


Any reason as to why this is happening? I've changed the _MBCS preprocessor definition to _UNICODE, which hasn't helped. I'm not even sure if that was a solution, but gave it a shot.

All help is appreciated! Thanks,
Bonafide

Here is the code:
Code: [Select]

#include <SFML/System.hpp>
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        cout << Clock.GetElapsedTime() << endl;
        sf::Sleep(0.5f);
    }

    return 0;
}

christoph

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.christoph-egger.org
Unicode errors with VS C++ 6 (aka VS98).
« Reply #1 on: March 03, 2009, 09:06:06 pm »
I fear SFML does not support MS VC 6.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unicode errors with VS C++ 6 (aka VS98).
« Reply #2 on: March 03, 2009, 10:56:33 pm »
Hmm, maybe it's just a matter of setting up your project. In particular, you may have an option like "treat wchar_t as a built-in type" which could solve the problem if checked.
Laurent Gomila - SFML developer

Bonafide

  • Newbie
  • *
  • Posts: 18
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #3 on: March 04, 2009, 02:51:28 am »
Quote from: "Laurent"
Hmm, maybe it's just a matter of setting up your project. In particular, you may have an option like "treat wchar_t as a built-in type" which could solve the problem if checked.


Where is this option found? Project settings?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unicode errors with VS C++ 6 (aka VS98).
« Reply #4 on: March 04, 2009, 07:43:36 am »
Yes.
On VS2005 it is in the "C/C++" --> "Language" category. Should be similar in VS98.
Laurent Gomila - SFML developer

Bonafide

  • Newbie
  • *
  • Posts: 18
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #5 on: March 05, 2009, 03:02:37 pm »
Thanks for the help Laurent, but I can't seem to find such an option. Google hasn't been much of a help either, I guess I may have to make the switch to SDL  :x .

Astrof

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #6 on: March 05, 2009, 03:37:42 pm »
Quote from: "Bonafide"
Thanks for the help Laurent, but I can't seem to find such an option. Google hasn't been much of a help either, I guess I may have to make the switch to SDL  :x .


couldn't you "switch" to a newer version of Visual Studio? (The express editions are free).  Or use Code::Blocks? VS98 is over a decade old...

dorkfish

  • Newbie
  • *
  • Posts: 38
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #7 on: March 05, 2009, 03:39:52 pm »
I'm with astrof, either use the Express version of visual studio or use code::blocks. If you felt like it, you could also use cmake + the cmake-sfml plugin to generate make/project files for a variety of build systems.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unicode errors with VS C++ 6 (aka VS98).
« Reply #8 on: March 05, 2009, 03:52:03 pm »
Yeah, it seems this option exists only since Visual Studio 2005.

This kind of issue will be fixed in SFML 2.0, until that we can try to find a workaround :)
Laurent Gomila - SFML developer

Bonafide

  • Newbie
  • *
  • Posts: 18
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #9 on: March 05, 2009, 07:28:24 pm »
Quote from: "Astrof"
Quote from: "Bonafide"
Thanks for the help Laurent, but I can't seem to find such an option. Google hasn't been much of a help either, I guess I may have to make the switch to SDL  :x .


couldn't you "switch" to a newer version of Visual Studio? (The express editions are free).  Or use Code::Blocks? VS98 is over a decade old...


Trust me, I'd love to upgrade to VS2008 Express, but as I said, we're trying to run the library on school computers. We don't have computer prviledges to install programs on the computers, we'd have to go through the IT Dept. of the school (which they won't approve of), and in any case the Express versions cannot be installed on the school computers due to the EULA issues (as told to me by our school IT guy).

We're going to stick with SFML, but we're telling the two guys in our group who were planning on doing all the work on the school computers to work on it at home. The fourth partner and I have been diligently learning SFML and a switch would hinder our progress, and considering it's technically due Monday of next week.

eleinvisible

  • Newbie
  • *
  • Posts: 47
    • View Profile
Unicode errors with VS C++ 6 (aka VS98).
« Reply #10 on: March 12, 2009, 12:26:57 am »
Quote from: "Bonafide"
Trust me, I'd love to upgrade to VS2008 Express, but as I said, we're trying to run the library on school computers. We don't have computer prviledges to install programs on the computers, we'd have to go through the IT Dept. of the school (which they won't approve of), and in any case the Express versions cannot be installed on the school computers due to the EULA issues (as told to me by our school IT guy).
I'd recommend to the IT Dept. to install Code::Blocks, it is much better than keeping VS98 (which isn't ISO). In our computer science class we have gcc (with g++) but the book is old and tells everyone to "#include <iostream.h>", most of the new kids get confused with the errors and never learn. Annoying having to explain ISO standards every time we start a project.

 

anything