VS express 2012: first attempt

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).

VS express 2012: first attempt

Postby shenle » Sat Oct 27, 2012 10:10 am

Still searching for a 100% free solution on Windows - trying VS express 2012, brand-spanking-new.

Checked out the latest svn (13420 I think), and set it to compile. It chokes on our version of boost:
Code: Select all
Error   1   error C1083: Cannot open include file: 'initializer_list': No such file or directory (..\..\vegastrike\boost\1_45\src\object\inheritance.cpp)   C:\games\vegastrike\vegastrike\boost\1_45\boost\unordered\unordered_set.hpp   27   1   vegastrike
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
 
Posts: 381
Topics: 30
Joined: Wed Jan 30, 2008 8:25 pm
Location: hiding in a dark corner

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: VS express 2012: first attempt

Postby loki1950 » Sat Oct 27, 2012 12:56 pm

Hi shenle have you had a look at this viewtopic.php?f=5&t=18051 thread,I managed to to get a running exe it's not trivial :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5723
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: VS express 2012: first attempt

Postby shenle » Sat Oct 27, 2012 1:18 pm

Yes I did. I didn't see any problems related to boost there.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
 
Posts: 381
Topics: 30
Joined: Wed Jan 30, 2008 8:25 pm
Location: hiding in a dark corner

Re: VS express 2012: first attempt

Postby pheonixstorm » Sun Oct 28, 2012 9:06 pm

How does VC 2012 look, haven't had a chance to test it out. Same as VC 2010 or did they change things around again.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Mon Jan 25, 2010 7:03 pm

Re: VS express 2012: first attempt

Postby shenle » Mon Oct 29, 2012 12:53 am

Of course it's different, it takes a little time to find things. They moved the whole side panel with source tree etc from the left to the right, but in general you can find things after a little while. The reason I'm testing it is: it's the current one and likely to be around for some time; also the compilers are supposed to be optimized/faster etc.

(edit) Going back to the error, after doing a bit of research it seems that for VS 2012 I need to put a
Code: Select all
#define BOOST_NO_0X_HDR_INITIALIZER_LIST

somewhere, preferably with a check for _MSC_VER = 1700

Not being an experienced programmer, I put it (for testing) just before the place where it's actually checked in vegastrike/boost/1_45/boost/unordered/unordered_set.hpp - currently recompiling to check if it solves the problem. Will likely take several hours on this slow machine. If it works, where should the #define be placed?


(edit2) With the following added at the top of unordered_set.hpp I got this to compile:
Code: Select all
#if (_MSC_VER >= 1700)
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
#endif


(there was another error: cannot include afxres.h in resources.rc - which is an old issue, dating back several years; I thought it was resolved but it shows again; fixed by replacing afhres.h with WinResrc.h)

The compilation phase finishes, yet at linking the following shows up:

Code: Select all
1>glut32.lib(glut32.dll) : error LNK2026: module unsafe for SAFESEH image.
1>glut32.lib(glut32.dll) : error LNK2026: module unsafe for SAFESEH image.
1>glut32.lib(glut32.dll) : error LNK2026: module unsafe for SAFESEH image.
1>glut32.lib(glut32.dll) : error LNK2026: module unsafe for SAFESEH image.
1>glut32.lib(glut32.dll) : error LNK2026: module unsafe for SAFESEH image.
1>  libogg_static.lib(framing.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>     Creating library C:\games\vegastrike\vega-vc9\Release\vegastrike.lib and object C:\games\vegastrike\vega-vc9\Release\vegastrike.exp
1>star_system.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::start(void)" (?start@Occlusion@@YAXXZ)
1>star_system.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::end(void)" (?end@Occlusion@@YAXXZ)
1>unit.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::addOccluder(class QVector const &,float,bool)" (?addOccluder@Occlusion@@YAXABVQVector@@M_N@Z)
1>gl_light_pick.obj : error LNK2001: unresolved external symbol "float __cdecl Occlusion::testOcclusion(class QVector const &,float,class QVector const &,float)" (?testOcclusion@Occlusion@@YAMABVQVector@@M0M@Z)
1>C:\games\vegastrike\vega-vc9\Release\vegastrike.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I will try to compile my own freeglut and use it instead of the included one. Any other ideas?



(edit3)


With freeglut compiled with MSVS express 2012 replacing the glut32 included in svn, I get past the glut linking errors. Yet this remains:

Code: Select all
1>  libogg_static.lib(framing.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>     Creating library C:\games\vegastrike\vega-vc9\Release\vegastrike.lib and object C:\games\vegastrike\vega-vc9\Release\vegastrike.exp
1>star_system.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::start(void)" (?start@Occlusion@@YAXXZ)
1>star_system.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::end(void)" (?end@Occlusion@@YAXXZ)
1>unit.obj : error LNK2001: unresolved external symbol "void __cdecl Occlusion::addOccluder(class QVector const &,float,bool)" (?addOccluder@Occlusion@@YAXABVQVector@@M_N@Z)
1>gl_light_pick.obj : error LNK2001: unresolved external symbol "float __cdecl Occlusion::testOcclusion(class QVector const &,float,class QVector const &,float)" (?testOcclusion@Occlusion@@YAMABVQVector@@M0M@Z)
1>C:\games\vegastrike\vega-vc9\Release\vegastrike.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I will stop for now. Please feel free to make suggestions.

(also, one final question. Why are we using the old glut 3.7 instead of freeglut?)
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
 
Posts: 381
Topics: 30
Joined: Wed Jan 30, 2008 8:25 pm
Location: hiding in a dark corner

Re: VS express 2012: first attempt

Postby log0 » Mon Oct 29, 2012 12:33 pm

I think you need to add src/gfx/occlusion.cpp to the project file.

http://vegastrike.svn.sourceforge.net/v ... w=revision
log0
 

Re: VS express 2012: first attempt

Postby shenle » Mon Oct 29, 2012 5:57 pm

log0 wrote:I think you need to add src/gfx/occlusion.cpp to the project file.

http://vegastrike.svn.sourceforge.net/v ... w=revision


Did that, and it solved the unresolved externals. For the linking to complete properly, I had to have 2 copies of the freeglut.lib available, one named freeglut.lib and the other one named glut32.lib (exact same library but with changed filename).

I got an executable, and it starts running but freezes during startup. I did have the freeglut.dll available in the win32/bin directory. Also stderr and stdout are blank, so I have nothing to report.

I tried replacing the glut32.dll from svn with a copy of freeglut.dll renamed (as for the libs) but it still freezes at the same point: "Loading cockpit/disabled/light ecm01.image" and no output to stderr or stdout.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
 
Posts: 381
Topics: 30
Joined: Wed Jan 30, 2008 8:25 pm
Location: hiding in a dark corner

Re: VS express 2012: first attempt

Postby pheonixstorm » Mon Oct 29, 2012 10:48 pm

I don't think it is a glut issue but something else that keeps getting "fixed" every time I or others mess when the windows solution.. Been awhile so I don't recall the exact problem. Try checking my old threads when I was compiling the new VC9 solution to work with cubemaps etc.

I can't wait until we can eventually get all of the windows related nonsense fixed :(
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Mon Jan 25, 2010 7:03 pm

Re: VS express 2012: first attempt

Postby log0 » Tue Oct 30, 2012 2:49 am

shenle wrote:I got an executable, and it starts running but freezes during startup. I did have the freeglut.dll available in the win32/bin directory. Also stderr and stdout are blank, so I have nothing to report.

I tried replacing the glut32.dll from svn with a copy of freeglut.dll renamed (as for the libs) but it still freezes at the same point: "Loading cockpit/disabled/light ecm01.image" and no output to stderr or stdout.

You have to compile python27 with vs2012 as vegastrike is passing file pointers to the linked python lib and you will get a runtime conflict. I've looked into this some time ago, tried to replace the calls, but didn't get them all it seemed. So the only alternative was to recompile python.

Btw I think I've got it to compile with mingw(codeblocks) after a few changes, which might be an alternative to visual studio.
log0
 

Re: VS express 2012: first attempt

Postby shenle » Tue Oct 30, 2012 3:25 am

Yes! That was it. I compiled python 2.7.3 with VSexp2012, and replaced the python27.dll in win32/bin with my new one. It works as expected. I didn't even have to recompile the binary - only replace the runtime library.

So now I have a binary that works, compiled with only free (beer) tools.

Still a few questions remain:
1. Where do I place #define BOOST_NO_0X_HDR_INITIALIZER_LIST - because modifying boost sources doesn't seem the right answer
2. why do we use the old glut instead of freeglut? recompiling glut with VS2012 is a much bigger hassle than doing the same for freeglut. Plus, the latest release of glut was 1998, whereas freeglut - 2012, with bugfixes.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
 
Posts: 381
Topics: 30
Joined: Wed Jan 30, 2008 8:25 pm
Location: hiding in a dark corner

Re: VS express 2012: first attempt

Postby log0 » Tue Oct 30, 2012 4:00 am

Put BOOST_NO_0X_HDR_INITIALIZER_LIST into project preprocessor definitions(project properties->C/C++->Preprocessor) to avoid modifying the source code.
log0
 

Re: VS express 2012: first attempt

Postby pheonixstorm » Tue Oct 30, 2012 5:17 am

I have my branch using freeglut rather than glut but never change it in trunk as I never got a response back from anyone on testing. As far as the
(there was another error: cannot include afxres.h in resources.rc - which is an old issue, dating back several years; I thought it was resolved but it shows again; fixed by replacing afhres.h with WinResrc.h)
that was only fixed for VC9 with a patch in the VC9 folder. Since the solution is from the non express edition I did not apply the patch but DID mention that it would need to be done in the VC9 folder readme.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Mon Jan 25, 2010 7:03 pm



Return to Compiling Problems [paste config.log]

Who is online

Users browsing this forum: No registered users and 2 guests