building in vs2008

For those having trouble installing/running the game or to report a bug

Moderator: Staff

User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

building in vs2008

Postby Wiinis » Fri Oct 24, 2008 10:12 am

Hey everyone,

I'm trying to build it in vs2008. I've followed the wiki and forum post to setup dependencies, however when I tried to build I get this error.

c:\Projects\Allacrost Dependencies\luabind\include\luabind/detail/policy.hpp(483) : error C2770: invalid explicit template argument(s) for 'luabind::detail::class_rep *luabind::detail::get_class_rep(lua_State *,void (__cdecl *)(T))'
c:\Projects\Allacrost Dependencies\luabind\include\luabind/detail/class_cache.hpp(78) : see declaration of 'luabind::detail::get_class_rep'
c:\Projects\Allacrost Dependencies\luabind\include\luabind/detail/convert_to_lua.hpp(73) : see reference to function template instantiation 'void luabind::detail::pointer_converter<luabind::detail::cpp_to_lua>::apply<hoa_battle::private_battle::BattleActor>(lua_State *,T *)' being compiled
with
[
T=hoa_battle::private_battle::BattleActor
]
c:\Projects\Allacrost Dependencies\luabind\include\luabind/object.hpp(977) : see reference to function template instantiation 'void luabind::detail::convert_to_lua<hoa_battle::private_battle::BattleActor*>(lua_State *,const T &)' being compiled
with
[
T=hoa_battle::private_battle::BattleActor *
]
c:\Projects\Allacrost Dependencies\luabind\include\luabind/detail/call_function.hpp(261) : see reference to function template instantiation 'void luabind::detail::push_args_from_tuple<Index>::apply<T0,boost::tuples::cons<HT,TT>>(lua_State *,const boost::tuples::cons<HT,boost::tuples::cons<HT,TT>> &)' being compiled
with
[
Index=1,
T0=hoa_battle::private_battle::BattleActor *const *,
HT=hoa_battle::private_battle::BattleActor *const *,
TT=boost::tuples::detail::map_tuple_to_cons<boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>::type
]
c:\Projects\Allacrost Dependencies\luabind\include\luabind/detail/call_function.hpp(253) : while compiling class template member function 'luabind::detail::proxy_function_void_caller<Tuple>::~proxy_function_void_caller(void)'
with
[
Tuple=boost::tuples::tuple<hoa_battle::private_battle::BattleActor *const *,hoa_battle::private_battle::BattleActor *const *,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>
]
.\src\modes\battle\battle_actions.cpp(149) : see reference to class template instantiation 'luabind::detail::proxy_function_void_caller<Tuple>' being compiled
with
[
Tuple=boost::tuples::tuple<hoa_battle::private_battle::BattleActor *const *,hoa_battle::private_battle::BattleActor *const *,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>
]


It happens multiple times throughout the whole building process, does anyone use vs2008 to build and succeeded? If so how did you fix this problem?

Mahalo,
Wiinis
User avatar
gorzuate
Developer
Posts: 2575
Joined: Thu Jun 17, 2004 3:03 am
Location: Hermosa Beach, CA
Contact:

Re: building in vs2008

Postby gorzuate » Fri Oct 24, 2008 5:37 pm

Since I don't run Windows I don't know how helpful this will be, but do make sure you installed Lua 5.0 and the luabind version that supports it.
Image
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: building in vs2008

Postby Roots » Fri Oct 24, 2008 5:41 pm

I think most of our Windows guys use vs2005 or 2006. I'm not a Windows user so I'm not certain about that though.
Image
User avatar
Drakkoon
Developer
Posts: 173
Joined: Thu Jan 11, 2007 12:54 am
Location: Montréal, Qc

Re: building in vs2008

Postby Drakkoon » Fri Oct 24, 2008 5:54 pm

I'm not sure if this is going to help you, as I don't remember the exact error I had when I compiled on vs2008. But Luabind needed to be patched, check this thread out: viewtopic.php?f=7&t=1982&st=0&sk=t&sd=a&start=20

Edit: yeah I reread the thread and that's the error:

FIX:

in luabind/detail/class_cache.hpp

Code: Select all

template<class T>
class_rep* get_class_rep(lua_State* L, void(*)(T) = 0)
{
    class_registry* registry = class_registry::get_registry(L);
    return registry->find_class(LUABIND_TYPEID(T));
}


replace by:

Code: Select all

template<class T>
class_rep* get_class_rep(lua_State* L, void(*)(T*) = 0)
{
    class_registry* registry = class_registry::get_registry(L);
    return registry->find_class(LUABIND_TYPEID(T));
}


Yeah, a single * missing...
Last edited by Drakkoon on Fri Oct 24, 2008 5:57 pm, edited 1 time in total.
User avatar
MindFlayer
Developer
Posts: 688
Joined: Fri Jan 06, 2006 12:55 pm
Location: Kuopio / Tampere, Finland
Contact:

Re: building in vs2008

Postby MindFlayer » Fri Oct 24, 2008 5:56 pm

Yes, it looks like you are having a wrong version of lua or luabind. Try to download the dependencies from our website:
http://www.allacrost.org/staff/libs/win/
User avatar
Drakkoon
Developer
Posts: 173
Joined: Thu Jan 11, 2007 12:54 am
Location: Montréal, Qc

Re: building in vs2008

Postby Drakkoon » Fri Oct 24, 2008 5:58 pm

MindFlayer wrote:Yes, it looks like you are having a wrong version of lua or luabind. Try to download the dependencies from our website:
http://www.allacrost.org/staff/libs/win/


Nope, not the wrong version of the lib, it's just that Microsoft updated their template compiling code, which breaks that line in the code.
User avatar
MindFlayer
Developer
Posts: 688
Joined: Fri Jan 06, 2006 12:55 pm
Location: Kuopio / Tampere, Finland
Contact:

Re: building in vs2008

Postby MindFlayer » Fri Oct 24, 2008 6:31 pm

Drakkoon wrote:
MindFlayer wrote:Yes, it looks like you are having a wrong version of lua or luabind. Try to download the dependencies from our website:
http://www.allacrost.org/staff/libs/win/


Nope, not the wrong version of the lib, it's just that Microsoft updated their template compiling code, which breaks that line in the code.

I see. I never even bothered to try VS2008 anyway. :ohnoes:
User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

Re: building in vs2008

Postby Wiinis » Fri Oct 24, 2008 10:23 pm

Thanks everyone, after replacing the code it compiles fine.

However, it seems like openal32.dll and jpeg62.dll are missing from the dependency files. I tried from getting them from the distributed demo folders, then it linked alright but still does not run.


'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\Allacrost.exe', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\SDL.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\SDL_net.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\SDL_ttf.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\libfreetype-6.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\zlib1.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\msvcr80.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\OpenAL32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\libpng13.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\jpeg62.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\Lua.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\LuaLib.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\gnu_gettext.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\msvcp90.dll'
'Allacrost.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\msvcr90.dll'
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\ogg.dll', Binary was not built with debug information.
'Allacrost.exe': Loaded 'C:\Projects\Allacrost\demo\vorbis.dll', Binary was not built with debug information.
The program '[3768] Allacrost.exe: Native' has exited with code 0 (0x0).


That's the linking information after I've copied over the openal32 and jpeg62.
User avatar
Drakkoon
Developer
Posts: 173
Joined: Thu Jan 11, 2007 12:54 am
Location: Montréal, Qc

Re: building in vs2008

Postby Drakkoon » Fri Oct 24, 2008 11:30 pm

You might have to build every dependencies from source using vs2008 as all the precompiled ones we have are compiled with vs2005. I'm pretty sure they have different runtimes and might be incompatible with vs2008. If you are having trouble getting it all to compile, you could always get 2005 express edition to compile with (it's still available, you have to look for the right link in the menu).

I don't remember if I ever got it all working in 2008, so unfortunately I can't get you precompiled dependencies and whatnot.
User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

Re: building in vs2008

Postby Wiinis » Sat Oct 25, 2008 12:33 am

Yea I made a few changes and still doesn't work in 2008.

I just downloaded the 2005, so I'll try that out.

Mahalo,
Wiinis
User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

Re: building in vs2008

Postby Wiinis » Sat Oct 25, 2008 4:03 am

k so here goes another one..

Downloaded and built it under vs2005, everythings fine until I run the game.

Before the boot screen even shows up, it freezes with this error in the output box..

First-chance exception at 0x7c918fea in Allacrost.exe: 0xC0000005: Access violation writing location 0x00000010.
Unhandled exception at 0x7c918fea in Allacrost.exe: 0xC0000005: Access violation writing location 0x00000010.
The program '[492] Allacrost.exe: Native' has exited with code 0 (0x0).

What's going on here ><
User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

Re: building in vs2008

Postby Wiinis » Sat Oct 25, 2008 12:35 pm

Ok I FIANLLY got it to build right, thanks to MindFlayer and everyone else =)

Now I can finally start doing something

Mahalo,
Wiinis
User avatar
Wiinis
Newbie
Posts: 15
Joined: Wed Oct 22, 2008 4:34 am
Location: Hawaii
Contact:

Re: building in vs2008

Postby Wiinis » Mon Oct 27, 2008 2:57 am

This is more of an efficiency issue for me, but now after being able to build it through release, building through debug still doesn't work. It compiles fine but when I try to run it it generates an error...

Unable to start program ....

This application has failed to start because the application configuration is incorrect. .......

I can still debug it manually using release but I won't be able to use breakpoints that way. Anyone have any ideas?
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: building in vs2008

Postby Roots » Mon Oct 27, 2008 3:27 am

I have no idea why everything seems so hard in Visual Studio. I've always been able to compile Allacrost with ease on Linux, regardless of compiler.
Image
User avatar
ElonNarai
Developer
Posts: 207
Joined: Sat Apr 19, 2008 2:43 pm
Location: Netherlands
Contact:

Re: building in vs2008

Postby ElonNarai » Tue Oct 28, 2008 8:21 pm

Wiinis wrote:This is more of an efficiency issue for me, but now after being able to build it through release, building through debug still doesn't work. It compiles fine but when I try to run it it generates an error...

Unable to start program ....

This application has failed to start because the application configuration is incorrect. .......

I can still debug it manually using release but I won't be able to use breakpoints that way. Anyone have any ideas?

Being the only other windows developer I guess I have to answer.
When you have an application configuration issue then it has most likely to do with the Visual C runtime, however you did install VS.NET, so I'm a bit suprised about this. However you are able to run it release mode, which means that the debug Visual C runtimes haven't been installed (which are installed with VS.NET). It might be that the libaries are build for an older Visual runtime. For more info on the problem you have you might want to read: http://msdn.microsoft.com/en-us/library/ms235299.aspx

I have written a step by step guide for VS.Net 2005 but if you still have troubles you can always contact me through msn or googletalk and I can talk you through it.

Roots wrote:I have no idea why everything seems so hard in Visual Studio. I've always been able to compile Allacrost with ease on Linux, regardless of compiler.
The problem is between the chair and the keyboard. I know VS.Net from inside out (well, almost :D ) and it just depends on what you are used to.

I can't stand postgresql because I know mysql better.
I can't stand c# because I know c++ better.
I can't stand linux because I know windows better.
I can't stand openoffice because I know MS Office better.
I can't stand myself because I know others better ;)

It's similair to the browser war, editor war, OS war, console war, etc. All of them are good, but it's just what you are used to.
Documenter and coder
Image
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: building in vs2008

Postby Roots » Thu Oct 30, 2008 3:03 pm

Well I'm just considering that we've had at least half a dozen threads on building in Windows, and we have sticky thread that's basically a long HOWTO document for building in Windows. I've never heard a single person ask how to build Allacrost on Linux in the forums or elsewhere for that matter. Maybe Microsoft should just stop changing the way you have to do something on every release of VS? :shrug:
Image
User avatar
ElonNarai
Developer
Posts: 207
Joined: Sat Apr 19, 2008 2:43 pm
Location: Netherlands
Contact:

Re: building in vs2008

Postby ElonNarai » Thu Oct 30, 2008 9:52 pm

I have been working with visual studio for seven years. I have used VS 6.0, VS.NET 2002, VS.NET 2003, VS.NET 2005 and VS.Net 2008. I even had to work with Visual C++ 5.0 once (was on a school pc) but that was only once and never more than once.

If there is one thing I do know is that the steps in setting up all the libaries and everything as explained in my step to step guide is virtually exactly the same for all Visual Studio versions (don't know about VC++).
Documenter and coder
Image
VerMan

Re: building in vs2008

Postby VerMan » Fri Oct 31, 2008 3:40 pm

ElonNarai wrote:I have been working with visual studio for seven years. I have used VS 6.0, VS.NET 2002, VS.NET 2003, VS.NET 2005 and VS.Net 2008. I even had to work with Visual C++ 5.0 once (was on a school pc) but that was only once and never more than once.

If there is one thing I do know is that the steps in setting up all the libaries and everything as explained in my step to step guide is virtually exactly the same for all Visual Studio versions (don't know about VC++).


Same here!
you are right ElonNarai, however I followed the instructions on setting up the VS 2005 solution (but using VS 2008) and I've got an unresolved external problem (something about Luabind_d.dll). Dammit, I think I won't bother and will install a Virtual Machine + SuSE and see how it goes.
User avatar
Roots
Dictator
Posts: 8665
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: building in vs2008

Postby Roots » Fri Oct 31, 2008 4:08 pm

Verman: did you read this entire thread? There's a change in the template code for VS 2008 that affects the Luabind library (the same dll you mentioned). Check if that fixes your problem.
Image
VerMan

Re: building in vs2008

Postby VerMan » Sun Nov 02, 2008 12:47 am

Yes, I did that change in the code but I was having an unresolved external (like if the dll couldn't be found). Anyway I don't have internet at home (perhaps the whole week) and I'm stuck since I deleted all the code from SVN and the deps and everything =(

Return to “Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest