Page 1 of 1

Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Wed May 26, 2010 6:04 pm
by shenle
I'm getting started to see if new win32 builds can be made using my C::B + free VC++ toolchain. Right off I get:

Code: Select all

al_init.cpp
..\vegastrike\src\aldrv\al_init.cpp(158) : error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'ALubyte *' to 'const ALCchar *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Process terminated with status 2 (0 minutes, 5 seconds)
1 errors, 0 warnings
Offending code is:

Code: Select all

al_init.cpp

    dev = alcOpenDevice( (ALubyte*) "DirectSound3D" );
Doesn't like bytes instead of chars. :)

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Thu May 27, 2010 7:58 pm
by klauss
svn up and retry, Hellcatv seems to have nailed this.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri May 28, 2010 3:00 am
by shenle

Code: Select all

dict.cpp
..\vegastrike\boost\1_42\src\dict.cpp(87) : error C2039: 'contains' : is not a member of 'boost::python::detail::dict_base'
        ..\vegastrike\boost\1_35\boost\python\dict.hpp(21) : see declaration of 'boost::python::detail::dict_base'

Code: Select all

bool dict_base::has_key(object_cref k) const
{
    return extract<bool>(this->contains(k)); 
}
Damn, I have headers mismatch. Grr...
Ignore above...

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri May 28, 2010 3:24 am
by shenle
I have just re-checked out the whole vegastrike source, I still get

Code: Select all

al_init.cpp
..\vegastrike\src\aldrv\al_init.cpp(158) : error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'ALubyte *' to 'const ALCchar *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri May 28, 2010 4:42 am
by klauss
It seems the commit was to the audio branch only.

I've merged the fix with trunk... svn up and retry again?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri May 28, 2010 12:17 pm
by shenle
First it complains it can't find vegastrike/src/audio/SimpleSound.cpp, SoundBuffer.cpp and RenderableListener.cpp
I assume these were removed on purpose... right? I took them off the project and rebuild;

Code: Select all

TemplateManager.cpp
m:\vegastrike\svn\vegastrike\src\audio\TemplateManager.h(52) : error C2065: 'TemplateManagerData' : undeclared identifier
m:\vegastrike\svn\vegastrike\src\audio\TemplateManager.h(52) : error C2955: 'boost::scoped_ptr' : use of class template requires template argument list
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
m:\vegastrike\svn\vegastrike\src\audio\TemplateManager.h(52) : error C2955: 'boost::scoped_ptr' : use of class template requires template argument list
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(66) : error C2065: 'TemplateInfo' : undeclared identifier
..\vegastrike\src\audio\TemplateManager.cpp(66) : error C2955: 'std::map' : use of class template requires template argument list
        E:\Program Files\Microsoft Visual C++ Toolkit 2003\include\map(149) : see declaration of 'std::map'
..\vegastrike\src\audio\TemplateManager.cpp(108) : error C2512: 'Audio::__impl::TemplateManagerData' : no appropriate default constructor available
..\vegastrike\src\audio\TemplateManager.cpp(109) : error C2542: 'Audio::TemplateManager::data' : class object has no constructor for initialization
..\vegastrike\src\audio\TemplateManager.cpp(113) : error C2662: 'boost::scoped_ptr<T>::~scoped_ptr' : cannot convert 'this' pointer from 'boost::scoped_ptr' to 'boost::scoped_ptr<T> &'
        Reason: cannot convert from 'boost::scoped_ptr' to 'boost::scoped_ptr<T>'
        Conversion requires a second user-defined-conversion operator or constructor
..\vegastrike\src\audio\TemplateManager.cpp(119) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(119) : error C2039: 'loadedDefinitions' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(119) : error C2228: left of '.count' must have class/struct/union type
..\vegastrike\src\audio\TemplateManager.cpp(120) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(120) : error C2039: 'loadedDefinitions' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(127) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(127) : error C2039: 'loadedDefinitions' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(127) : error C2228: left of '.count' must have class/struct/union type
..\vegastrike\src\audio\TemplateManager.cpp(128) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(128) : error C2039: 'loadedDefinitions' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(138) : error C2678: binary '*' : no operator found which takes a left-hand operand of type 'const boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(138) : error C2227: left of '->getDefinitionFile' must point to class/struct/union
..\vegastrike\src\audio\TemplateManager.cpp(145) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(145) : error C2039: 'getDefinitionFile' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(148) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(148) : error C2039: 'getDefinitionFile' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(155) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(155) : error C2039: 'defaultDefinitionFile' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
..\vegastrike\src\audio\TemplateManager.cpp(161) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'const boost::scoped_ptr' (or there is no acceptable conversion)
..\vegastrike\src\audio\TemplateManager.cpp(161) : error C2039: 'defaultDefinitionFile' : is not a member of 'boost::scoped_ptr'
        ..\vegastrike\boost\1_35\boost\scoped_ptr.hpp(141) : see declaration of 'boost::scoped_ptr'
Process terminated with status 2 (1 minutes, 56 seconds)
28 errors, 0 warnings
Further down I see there's no test.cpp in audio anymore; OK to remove also?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri May 28, 2010 10:31 pm
by klauss
Dang... I must have mis-merged something.

I'll revisit the merge when I get home.

(this should be so simple that it's embarrasing that it's taking this long)

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Sat May 29, 2010 5:19 am
by pheonixstorm
shenle wrote:I'm getting started to see if new win32 builds can be made using my C::B + free VC++ toolchain. Right off I get:

Code: Select all

al_init.cpp
..\vegastrike\src\aldrv\al_init.cpp(158) : error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'ALubyte *' to 'const ALCchar *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Process terminated with status 2 (0 minutes, 5 seconds)
1 errors, 0 warnings
Offending code is:

Code: Select all

al_init.cpp

    dev = alcOpenDevice( (ALubyte*) "DirectSound3D" );
Doesn't like bytes instead of chars. :)
Did you do a search for where ALubyte is set?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Thu Jun 10, 2010 5:42 pm
by shenle
FWIW the errors from my post above are still present.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 11, 2010 1:47 am
by klauss
Sorry, I had a busy time a school. Exams lurking ahead, still.

That seems like a missing .cpp file in the project rather than a code issue, I reviewed the commit over and over and it doesn't make sense that it would produce that error, and the code is indeed complete (since it builds fine in linux).

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 11, 2010 10:42 am
by charlieg
shenle: try a fresh checkout?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 11, 2010 5:32 pm
by shenle
This is a fresh checkout. I wiped everything and started over before even posting.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 11, 2010 6:47 pm
by Mets
The last I had tried/heard, which was a few months ago, was that there is no way to compile under windows anything past r12613. Pheonixstorm can chime in here, as he might have gotten later revisions to work, but I was not able to. If you can compile on that revision, and not on head, I'd assume the issues are somehow tied into the cubemap code that we've had trouble getting to work on windows.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Sat Jun 12, 2010 4:03 pm
by shenle
My last successful compile on Windows was of revision 12763 on 4/18/2010

(OTOH on Linux it compiles - last successful compile today - but the binary won't run correctly)

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Mon Jun 14, 2010 4:05 pm
by klauss
shenle wrote:My last successful compile on Windows was of revision 12763 on 4/18/2010

(OTOH on Linux it compiles - last successful compile today - but the binary won't run correctly)
How so?

I've been experiencing some crashes too, I've been trying to find the bug but couldn't.

And since revisions that did build and run perfectly fine now crash for me, I'm suspecting some kind of system update is bringing some trouble.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Tue Jun 15, 2010 5:09 pm
by shenle
Not exactly crashing, but...

The game windows opens, and then nothing happens. The window stays black. I have to kill -9 the process. I'll see if I can post a stdout/stderr output later on. This is on Ubuntu 10.04 with all the updates. System boost is, I think, 1.40. Cmake compile.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Thu Jun 17, 2010 7:50 pm
by Mets
shenle wrote:My last successful compile on Windows was of revision 12763 on 4/18/2010

(OTOH on Linux it compiles - last successful compile today - but the binary won't run correctly)
Did somebody fix the cubemap problem on Windows and I'm just super behind? I'll have to give it another go. I recently switched to windows 7 and lost my build environment, and I was hesitant to start trying to compile under the new OS. I might try under cygwin, if nothing else, though I expect difficulties there, too.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 18, 2010 12:13 am
by shenle
Good luck with cygwin. I gave it up.

I use the method I described in this thread: http://vegastrike.sourceforge.net/forum ... =5&t=15264

It's not complicated to set it up. I have it on my laptop too (win7 64-bit) and works.

Yes, I have a few windows binaries compiled with cubemaps and working properly.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jun 18, 2010 7:02 am
by Mets
Awesome, so the windows binary in SVN is now on r127xx?

Are there any ramifications to using this Toolkit 2003 and the vc7 folder, as opposed to using the latest tools from Microsoft? And I don't see why Toolkit would work and the latest Visual C++ would not...

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 1:16 pm
by shenle
FWIW, the TemplateManager errors listed in my post above (may 28) are still in the latest checkout and stop the build.
http://vegastrike.sourceforge.net/forum ... 02#p117861

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 3:26 pm
by klauss
Be warned, though, that in order to successfully compile in windows hellcatv had to pull in updated versions of a few libraries.

ffmpeg and OpenAL I think.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 4:47 pm
by shenle
Those errors look more like they're boost related. I may be wrong.

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 4:55 pm
by klauss
Nah, the boost error messages appear after the first error.

I routinely ignore everything after the first error, because errors in C/C++ tend to build up like a snowball. Only the first message is meaningful, the rest are the compiler desperately attempting (a futile attempt) to go on compiling.

What are you building exactly? What URL did you check out? What's your config.log? Are you using cmake or autoconf?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 6:44 pm
by shenle
klauss wrote: Nah, the boost error messages appear after the first error.

I routinely ignore everything after the first error, because errors in C/C++ tend to build up like a snowball. Only the first message is meaningful, the rest are the compiler desperately attempting (a futile attempt) to go on compiling.

What are you building exactly? What URL did you check out? What's your config.log? Are you using cmake or autoconf?

Given that this thread is about a Windows build, there's no config.log, no cmake and no autoconf. I am using my build environment which is detailed in this thread: viewtopic.php?f=5&t=15264 using C::B and VC++ toolkit 2003. I'm building vegastrike, checked out using TortoiseSVN from vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk

Back to the error on hand, the first one that shows is

Code: Select all

error C2065: 'TemplateManagerData' : undeclared identifier
Where is TemplateManagerData supposed to come from?

Re: Win32/rev.12789/C::B/VC++toolkit2003 error

Posted: Fri Jul 30, 2010 10:23 pm
by klauss
Given that this thread is about a Windows build, there's no config.log, no cmake and no autoconf.
LOL - I got it mixed up with another thread that was about kubuntu... sorry.
Where is TemplateManagerData supposed to come from?
It's defined right there in the same file as a forward declaration.

It's defined finally in the TemplateManager.cpp file.

BTW: There was an older revision of the file that had it wrong, it said AutoPtr<TemplateManagerData> when it ought to say AutoPtr<__impl::TemplateManagerData>. I just checked, and that's the version in trunk (oops).

Since trunk builds in linux, I must assume it's an older version of TemplateManager that wasn't ready, and should not be included in the project file. So you could remove TemplateManager.cpp from the project and build, it should work fine, TemplateManager shouldn't be being used anywhere at that revision anyways.

In any case, the upcoming merge of the audio branch will change all that. And a whole bunch of new worries, but at least that particular one will be gone ;)

EDIT: I made a mistake and edited your post instead of replying - sorry about that. I tried to recreate your post.