Changeset 1162


Ignore:
Timestamp:
Mar 13, 2012, 8:04:34 PM (9 years ago)
Author:
gary
Message:

win32: various compilation fixes, mostly project updates, but also a
workaround for a Visual Studio compiler bug (Connect Id #730878).

Location:
trunk
Files:
6 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/image/image-private.h

    r963 r1162  
    3131    ImageLoader *next;
    3232    int priority;
    33 
    34     static bool RegisterAllLoaders();
    3533
    3634    static void RegisterLoader(ImageLoader *loader)
     
    8987
    9088#define REGISTER_IMAGE_LOADER(name) \
    91     extern void (Register##name)(); \
     89    extern void Register##name(); \
    9290    Register##name();
    9391
  • trunk/src/image/image.cpp

    r981 r1162  
    2323{
    2424
    25 bool ImageLoader::RegisterAllLoaders()
     25static bool RegisterAllLoaders()
    2626{
     27    /* We cannot make this an ImageLoader member function, because the
     28     * REGISTER_IMAGE_LOADER macro forward-declares free functions from
     29     * the "lol" namespace. An apparent bug in Visual Studio's compiler
     30     * makes it think these functions are actually in the top-level
     31     * namespace when the forward declaration is in a class member function.
     32     * To avoid the problem, we make the forward declaration in a free
     33     * function. */
    2734#if defined __ANDROID__
    2835    REGISTER_IMAGE_LOADER(AndroidImageData)
     
    5158Image::Image(char const *path)
    5259{
    53     static bool unused = ImageLoader::RegisterAllLoaders();
     60    static bool unused = RegisterAllLoaders();
    5461
    5562    data = ImageLoader::Load(path);
  • trunk/test/tutorial/tut03.cpp

    r1147 r1162  
    1414
    1515#include <cstring>
     16#include <cmath>
    1617
    1718#include "core.h"
     
    343344    {
    344345        double const maxsqlen = 1024;
    345         double const k1 = 1.0 / (1 << 10) / log2(maxsqlen);
     346        double const k1 = 1.0 / (1 << 10) / (std::log(maxsqlen) / std::log(2.0));
    346347
    347348        int jmin = ((m_frame + 1) % 4) / 2 + line;
  • trunk/win32/benchsuite.vcxproj

    r968 r1162  
    2121  <ItemGroup>
    2222    <ClCompile Include="..\test\benchmark\half.cpp" />
    23     <ClCompile Include="..\test\benchmark\matrix.cpp" />
     23    <ClCompile Include="..\test\benchmark\real.cpp" />
    2424    <ClCompile Include="..\test\benchmark\trig.cpp" />
     25    <ClCompile Include="..\test\benchmark\vector.cpp" />
    2526    <ClCompile Include="..\test\benchsuite.cpp" />
    2627  </ItemGroup>
  • trunk/win32/lolengine.sln

    r968 r1162  
    3939                {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
    4040        EndProjectSection
     41EndProject
     42Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tutorial", "Tutorial", "{E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}"
     43EndProject
     44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut01", "tut01.vcxproj", "{B92ABADC-45BE-4CC5-B724-9426053123A1}"
     45EndProject
     46Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut02", "tut02.vcxproj", "{7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}"
     47EndProject
     48Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut03", "tut03.vcxproj", "{6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}"
    4149EndProject
    4250Global
     
    118126                {80F81C11-8DA2-4990-91CB-9807783BA46E}.Release|Xbox 360.Build.0 = Release|Xbox 360
    119127                {80F81C11-8DA2-4990-91CB-9807783BA46E}.Release|Xbox 360.Deploy.0 = Release|Xbox 360
     128                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Debug|Win32.ActiveCfg = Debug|Win32
     129                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Debug|Win32.Build.0 = Debug|Win32
     130                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
     131                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
     132                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360
     133                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Release|Win32.ActiveCfg = Release|Win32
     134                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Release|Win32.Build.0 = Release|Win32
     135                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
     136                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Release|Xbox 360.Build.0 = Release|Xbox 360
     137                {B92ABADC-45BE-4CC5-B724-9426053123A1}.Release|Xbox 360.Deploy.0 = Release|Xbox 360
     138                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Debug|Win32.ActiveCfg = Debug|Win32
     139                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Debug|Win32.Build.0 = Debug|Win32
     140                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
     141                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
     142                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360
     143                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Release|Win32.ActiveCfg = Release|Win32
     144                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Release|Win32.Build.0 = Release|Win32
     145                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
     146                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Release|Xbox 360.Build.0 = Release|Xbox 360
     147                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}.Release|Xbox 360.Deploy.0 = Release|Xbox 360
     148                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Debug|Win32.ActiveCfg = Debug|Win32
     149                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Debug|Win32.Build.0 = Debug|Win32
     150                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
     151                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
     152                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360
     153                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Release|Win32.ActiveCfg = Release|Win32
     154                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Release|Win32.Build.0 = Release|Win32
     155                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
     156                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Release|Xbox 360.Build.0 = Release|Xbox 360
     157                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}.Release|Xbox 360.Deploy.0 = Release|Xbox 360
    120158        EndGlobalSection
    121159        GlobalSection(SolutionProperties) = preSolution
     
    129167                {B1E10086-A1DA-401A-834D-969C9DBB5CC1} = {E0491194-35E3-4513-9D31-608EA3165ECF}
    130168                {80F81C11-8DA2-4990-91CB-9807783BA46E} = {E0491194-35E3-4513-9D31-608EA3165ECF}
     169                {B92ABADC-45BE-4CC5-B724-9426053123A1} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
     170                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
     171                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
    131172        EndGlobalSection
    132173EndGlobal
  • trunk/win32/testsuite.vcxproj

    r1146 r1162  
    2020  </ItemGroup>
    2121  <ItemGroup>
     22    <ClCompile Include="..\test\testsuite.cpp" />
    2223    <ClCompile Include="..\test\unit\build.cpp" />
    2324    <ClCompile Include="..\test\unit\cmplx.cpp" />
  • trunk/win32/tut01.vcxproj

    r1161 r1162  
    2020  </ItemGroup>
    2121  <ItemGroup>
    22     <ClCompile Include="..\test\benchmark\half.cpp" />
    23     <ClCompile Include="..\test\benchmark\matrix.cpp" />
    24     <ClCompile Include="..\test\benchmark\trig.cpp" />
    25     <ClCompile Include="..\test\benchsuite.cpp" />
     22    <ClCompile Include="..\test\tutorial\tut01.cpp" />
    2623  </ItemGroup>
    2724  <PropertyGroup Label="Globals">
    28     <ProjectGuid>{B1E10086-A1DA-401A-834D-969C9DBB5CC1}</ProjectGuid>
     25    <ProjectGuid>{b92abadc-45be-4cc5-b724-9426053123a1}</ProjectGuid>
    2926    <Keyword>Win32Proj</Keyword>
    3027    <RootNamespace>testmap</RootNamespace>
     
    10198      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    10299      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    103       <FloatingPointModel>Fast</FloatingPointModel>
    104100    </ClCompile>
    105101    <Link>
     
    121117      <PreprocessorDefinitions>_XBOX;_DEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    122118      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    123       <FloatingPointModel>Fast</FloatingPointModel>
    124119    </ClCompile>
    125120    <Link>
     
    143138      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    144139      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    145       <FloatingPointModel>Fast</FloatingPointModel>
    146140    </ClCompile>
    147141    <Link>
     
    167161      <PreprocessorDefinitions>_XBOX;NDEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    168162      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    169       <FloatingPointModel>Fast</FloatingPointModel>
    170163    </ClCompile>
    171164    <Link>
  • trunk/win32/tut02.vcxproj

    r1161 r1162  
    2020  </ItemGroup>
    2121  <ItemGroup>
    22     <ClCompile Include="..\test\benchmark\half.cpp" />
    23     <ClCompile Include="..\test\benchmark\matrix.cpp" />
    24     <ClCompile Include="..\test\benchmark\trig.cpp" />
    25     <ClCompile Include="..\test\benchsuite.cpp" />
     22    <ClCompile Include="..\test\tutorial\tut02.cpp" />
    2623  </ItemGroup>
    2724  <PropertyGroup Label="Globals">
    28     <ProjectGuid>{B1E10086-A1DA-401A-834D-969C9DBB5CC1}</ProjectGuid>
     25    <ProjectGuid>{7b083da2-fe08-4f6d-bfdd-195d5c2783eb}</ProjectGuid>
    2926    <Keyword>Win32Proj</Keyword>
    3027    <RootNamespace>testmap</RootNamespace>
     
    10198      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    10299      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    103       <FloatingPointModel>Fast</FloatingPointModel>
    104100    </ClCompile>
    105101    <Link>
     
    121117      <PreprocessorDefinitions>_XBOX;_DEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    122118      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    123       <FloatingPointModel>Fast</FloatingPointModel>
    124119    </ClCompile>
    125120    <Link>
     
    143138      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    144139      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    145       <FloatingPointModel>Fast</FloatingPointModel>
    146140    </ClCompile>
    147141    <Link>
     
    167161      <PreprocessorDefinitions>_XBOX;NDEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    168162      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    169       <FloatingPointModel>Fast</FloatingPointModel>
    170163    </ClCompile>
    171164    <Link>
  • trunk/win32/tut03.vcxproj

    r1161 r1162  
    2020  </ItemGroup>
    2121  <ItemGroup>
    22     <ClCompile Include="..\test\benchmark\half.cpp" />
    23     <ClCompile Include="..\test\benchmark\matrix.cpp" />
    24     <ClCompile Include="..\test\benchmark\trig.cpp" />
    25     <ClCompile Include="..\test\benchsuite.cpp" />
     22    <ClCompile Include="..\test\tutorial\tut03.cpp" />
    2623  </ItemGroup>
    2724  <PropertyGroup Label="Globals">
    28     <ProjectGuid>{B1E10086-A1DA-401A-834D-969C9DBB5CC1}</ProjectGuid>
     25    <ProjectGuid>{6bf81b39-edc2-4227-9992-c2d8abea95af}</ProjectGuid>
    2926    <Keyword>Win32Proj</Keyword>
    3027    <RootNamespace>testmap</RootNamespace>
     
    10198      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    10299      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    103       <FloatingPointModel>Fast</FloatingPointModel>
    104100    </ClCompile>
    105101    <Link>
     
    121117      <PreprocessorDefinitions>_XBOX;_DEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    122118      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    123       <FloatingPointModel>Fast</FloatingPointModel>
    124119    </ClCompile>
    125120    <Link>
     
    143138      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    144139      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    145       <FloatingPointModel>Fast</FloatingPointModel>
    146140    </ClCompile>
    147141    <Link>
     
    167161      <PreprocessorDefinitions>_XBOX;NDEBUG;_CONSOLE;$(XboxDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    168162      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(GlIncludes);$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    169       <FloatingPointModel>Fast</FloatingPointModel>
    170163    </ClCompile>
    171164    <Link>
Note: See TracChangeset for help on using the changeset viewer.