Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
I'm getting an error building streflop with a fresh checkout :
Error in English: make (e=2): The system cannot find the file specified.
I've put a dummy streflop.a to get spring compiling, but obviously it fails when linking. It seems like an easy problem to fix, but I'm afraid I'm not really experienced on the subject.
The solver of this problem will be sumptuously rewarded with dates and figs.
Code: Select all
scons: Reading SConscript files ...
make -C libm
make[1]: Nothing to be done for `all'.
process_begin: CreateProcess((null), rm -f streflop.a, ...) failed.
make (e=2): Het systeem kan het opgegeven bestand niet vinden.
make: *** [streflop.a] Error 2
Failed building streflop!
I've put a dummy streflop.a to get spring compiling, but obviously it fails when linking. It seems like an easy problem to fix, but I'm afraid I'm not really experienced on the subject.
The solver of this problem will be sumptuously rewarded with dates and figs.
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
compiling latest svn with vs net 2003, i get the following error (which im not able to fix, i updated the vcproj by adding the new files, deleting old ones though)
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(651): error C3861: 'floor': identifier not found, even with argument-dependent lookup
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(652): error C3861: 'pow': identifier not found, even with argument-dependent lookup
its in
r = luai_nummod(v1, v2); break;
which calls floor(..)
i checked the definition, math.h should be inlcuded, i dont get whats wrong
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(651): error C3861: 'floor': identifier not found, even with argument-dependent lookup
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(652): error C3861: 'pow': identifier not found, even with argument-dependent lookup
its in
r = luai_nummod(v1, v2); break;
which calls floor(..)
i checked the definition, math.h should be inlcuded, i dont get whats wrong
The problem is that streflop excludes the standard library math routines.submarine wrote:compiling latest svn with vs net 2003, i get the following error (which im not able to fix, i updated the vcproj by adding the new files, deleting old ones though)
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(651): error C3861: 'floor': identifier not found, even with argument-dependent lookup
D:\Spiele\TA Spring Source\lua\lua\src\lcode.cpp(652): error C3861: 'pow': identifier not found, even with argument-dependent lookup
its in
r = luai_nummod(v1, v2); break;
which calls floor(..)
i checked the definition, math.h should be inlcuded, i dont get whats wrong
The developers have changed most instances of ├óÔé¼┼ô#include <math.h>├óÔé¼┬Ø to ├óÔé¼┼ô#include "float3.h"├óÔé¼┬Ø but apparently missed this one.
Patch:
Code: Select all
Index: lua/lua/include/luaconf.h
===================================================================
--- lua/lua/include/luaconf.h (revision 3767)
+++ lua/lua/include/luaconf.h (working copy)
@@ -531,7 +531,9 @@
@@ The luai_num* macros define the primitive operations over numbers.
*/
#if defined(LUA_CORE)
-#include <math.h>
+//SPRING#include <math.h>
+#include "float3.h"
+
#define luai_numadd(a,b) ((a)+(b))
#define luai_numsub(a,b) ((a)-(b))
#define luai_nummul(a,b) ((a)*(b))
Index: rts/lib/streflop/Math.cpp
===================================================================
--- rts/lib/streflop/Math.cpp (revision 3767)
+++ rts/lib/streflop/Math.cpp (working copy)
@@ -3,33 +3,31 @@
namespace streflop {
- // MSVC chokes on these constants,
- // TODO: we need another way to specify them. (hardcode the bitpattern?)
-#ifndef _MSC_VER
-
// Constants
- const Simple SimplePositiveInfinity = Simple(1.0f) / Simple(0.0f);
- const Simple SimpleNegativeInfinity = Simple(-1.0f) / Simple(0.0f);
+ const Simple SimpleZero(0.0f);
+ const Simple SimplePositiveInfinity = Simple(1.0f) / SimpleZero;
+ const Simple SimpleNegativeInfinity = Simple(-1.0f) / SimpleZero;
// TODO: non-signaling version
const Simple SimpleNaN = SimplePositiveInfinity + SimpleNegativeInfinity;
- const Double DoublePositiveInfinity = Double(1.0f) / Double(0.0f);
- const Double DoubleNegativeInfinity = Double(-1.0f) / Double(0.0f);
+ const Double DoubleZero(0.0f);
+ const Double DoublePositiveInfinity = Double(1.0f) / DoubleZero;
+ const Double DoubleNegativeInfinity = Double(-1.0f) / DoubleZero;
// TODO: non-signaling version
const Double DoubleNaN = DoublePositiveInfinity + DoubleNegativeInfinity;
// Extended are not always available
#ifdef Extended
- const Extended ExtendedPositiveInfinity = Extended(1.0f) / Extended(0.0f);
- const Extended ExtendedNegativeInfinity = Extended(-1.0f) / Extended(0.0f);
+ const Extended ExtendedZero(0.0f);
+ const Extended ExtendedPositiveInfinity = Extended(1.0f) / ExtendedZero;
+ const Extended ExtendedNegativeInfinity = Extended(-1.0f) / ExtendedZero;
// TODO: non-signaling version
const Extended ExtendedNaN = ExtendedPositiveInfinity + ExtendedNegativeInfinity;
#endif
-#endif // _MSC_VER
// Default environment. Initalized to 0, and really set on first access
compiling with vs.net 2003 seems to work, now i get a linker error
"rts fatal error LNK1104: cannot open file '../zlib/lib/zlib.lib'"
-> i added "../../../crashrpt/zlib/lib" and "../../../crashrpt" to the linker paths (since the file mentioned is located at ../../../crashrpt/zlib/lib/zlib.lib but this doesnt solve the issue. i also added "zlib.lib" to the list of additional dependencies (tried ../../../crashrpt/zlib/lib/zlib.lib as well)
"rts fatal error LNK1104: cannot open file '../zlib/lib/zlib.lib'"
-> i added "../../../crashrpt/zlib/lib" and "../../../crashrpt" to the linker paths (since the file mentioned is located at ../../../crashrpt/zlib/lib/zlib.lib but this doesnt solve the issue. i also added "zlib.lib" to the list of additional dependencies (tried ../../../crashrpt/zlib/lib/zlib.lib as well)
Hi, guys!
Sorry for stupid question, but I wonder if it's possible to build /trunk version of Spring. I've tried, but I've got lots of errors because of wrong file location or unresolved externals... Could someone explain me the /trunk purpose and how to use it, and if it's possible to build it could you please spare me correct rts.vsproj!
P.S. My compiler is MSVC7.1 and I've build /tags/taspring_0.74b3 successfully, So it's not about missing libraries.
Thanks in advance!
Sorry for stupid question, but I wonder if it's possible to build /trunk version of Spring. I've tried, but I've got lots of errors because of wrong file location or unresolved externals... Could someone explain me the /trunk purpose and how to use it, and if it's possible to build it could you please spare me correct rts.vsproj!
P.S. My compiler is MSVC7.1 and I've build /tags/taspring_0.74b3 successfully, So it's not about missing libraries.
Thanks in advance!
ivand, you need the vclibs package, read the start of this sticky.
submarine, in VS you cant just stick a path on the start of a library filename when its expecting a filename. Remove the ..\ stuff and add the folder path to the list of folders it looks in so your referencing zlib.lib not ..\libs\zlib\zlib.lib etc.
submarine, in VS you cant just stick a path on the start of a library filename when its expecting a filename. Remove the ..\ stuff and add the folder path to the list of folders it looks in so your referencing zlib.lib not ..\libs\zlib\zlib.lib etc.
AF, as I wrote before it's not because of missing VCLIBS, I've managed to compile any /tags/* version, so i do know about additional libs...AF wrote:ivand, you need the vclibs package, read the start of this sticky.
submarine, in VS you cant just stick a path on the start of a library filename when its expecting a filename. Remove the ..\ stuff and add the folder path to the list of folders it looks in so your referencing zlib.lib not ..\libs\zlib\zlib.lib etc.
The compiler whines because some Lua source files have been referenced wrong in rts.vcproj: some of them actually missing in specified location or pointing to wrong directories.
For instance:
These files are referenced in rts.vcproj (for 7.1):
Code: Select all
"..\..\Lua\LuaConstSpring.h"
"..\..\Lua\LuaConstSpring.cpp"
Am I doing something wrong?
Any useful advice would be great.
Last edited by ivand on 07 Jul 2007, 04:35, edited 1 time in total.
I've just tried to compile /trunk using MSVC2005 and "rts\build\vstudio8\rts.vcproj" accordingly. So what can I say? It's NOT as broken as "rts\build\vstudio7\rts.vcproj" is, but it's also doesn't compile with the errors like those below:
^^^ Replaced all "at" symbol with (at).
I think I'll try to fix them by myself, If someone does not give me a hint.
========
Added later:
========
I managed to fix rts.vcproj for MSVC2005 by myself. Anyone need it?
Code: Select all
Error 57 error LNK2001: unresolved external symbol "public: static class creg::ClassBinder CUnitSet::binder" (?binder(at)CUnitSet(at)(at)2VClassBinder(at)creg(at)(at)A) Group.obj
Error 60 error LNK2019: unresolved external symbol __imp__iluCrop(at)24 referenced in function "public: bool __thiscall Glyph::Outline(unsigned int)" (?Outline(at)Glyph(at)(at)QAE_NI(at)Z) FontTexture.obj
I think I'll try to fix them by myself, If someone does not give me a hint.
========
Added later:
========
I managed to fix rts.vcproj for MSVC2005 by myself. Anyone need it?
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
Hmm, never knew about it. Thx for info.Brain Damage wrote:out of curiosity, may i ask you why you wanted to compile using visual studio?
to debug or to play?
beware that visual studio builds are NOT compatible with the "official" builds and the "offical test builds"
To code and to debug actually. I think it won't be a problem to compile it later with official compiler

- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10