From efb99338f67349a811a48d5dc8c1e64c43bd8a72 Mon Sep 17 00:00:00 2001 From: Tim Hughes Date: Wed, 9 Jul 2014 19:43:39 +0100 Subject: [PATCH] Fixed MSVC build errors and updated projects. --- alethzero/MiningView.cpp | 2 +- liblll/Parser.cpp | 18 ++- libserpent/parser.cpp | 2 +- libserpent/util.cpp | 2 +- windows/Alethzero.vcxproj | 3 + windows/Alethzero.vcxproj.filters | 2 +- windows/Ethereum.sln | 11 ++ windows/LibEthereum.props | 6 +- windows/LibEthereum.vcxproj | 64 +++++----- windows/LibEthereum.vcxproj.filters | 185 +++++++++++++++------------ windows/LibSerpent.vcxproj | 187 ++++++++++++++++++++++++++++ windows/LibSerpent.vcxproj.filters | 18 +++ 12 files changed, 380 insertions(+), 120 deletions(-) create mode 100644 windows/LibSerpent.vcxproj create mode 100644 windows/LibSerpent.vcxproj.filters diff --git a/alethzero/MiningView.cpp b/alethzero/MiningView.cpp index 5720bb595..f09fe425f 100644 --- a/alethzero/MiningView.cpp +++ b/alethzero/MiningView.cpp @@ -104,7 +104,7 @@ void MiningView::paintEvent(QPaintEvent*) Grapher g; QPainter p(this); - g.init(&p, make_pair(0.f, max(m_duration * 0.1f, m_values.size() * 0.1f)), make_pair(0, 255.f - (m_progress.requirement - 4)), s, id, sL); + g.init(&p, make_pair(0.f, max((float)m_duration * 0.1f, (float)m_values.size() * 0.1f)), make_pair(0.0f, 255.f - ((float)m_progress.requirement - 4.0f)), s, id, sL); g.drawAxes(); g.setDataTransform(0.1f, 0, -1.0f, 255.f); diff --git a/liblll/Parser.cpp b/liblll/Parser.cpp index 314e6cf78..1907fd17c 100644 --- a/liblll/Parser.cpp +++ b/liblll/Parser.cpp @@ -69,9 +69,24 @@ void eth::debugOutAST(ostream& _out, sp::utree const& _this) } } +namespace eth { +namespace parseTreeLLL_ { + +template +struct tagNode +{ + void operator()(sp::utree& n, qi::rule::context_type& c) const + { + (boost::fusion::at_c<0>(c.attributes) = n).tag(N); + } +}; + +}} + void eth::parseTreeLLL(string const& _s, sp::utree& o_out) { using qi::ascii::space; + using eth::parseTreeLLL_::tagNode; typedef sp::basic_string symbol_type; typedef string::const_iterator it; @@ -96,8 +111,7 @@ void eth::parseTreeLLL(string const& _s, sp::utree& o_out) qi::rule calldataload = qi::lit("$") > element; qi::rule list = '(' > *element > ')'; - auto x = [](int a) { return [=](sp::utree& n, typename qi::rule::context_type& c) { (boost::fusion::at_c<0>(c.attributes) = n).tag(a); }; }; - qi::rule extra = sload[x(2)] | mload[x(1)] | sstore[x(4)] | mstore[x(3)] | seq[x(5)] | calldataload[x(6)]; + qi::rule extra = sload[tagNode<2>()] | mload[tagNode<1>()] | sstore[tagNode<4>()] | mstore[tagNode<3>()] | seq[tagNode<5>()] | calldataload[tagNode<6>()]; element = atom | list | extra; string s; diff --git a/libserpent/parser.cpp b/libserpent/parser.cpp index ace761407..74b7efc26 100644 --- a/libserpent/parser.cpp +++ b/libserpent/parser.cpp @@ -54,7 +54,7 @@ std::vector shuntingYard(std::vector tokens) { std::vector oq; std::vector stack; Node prev, tok; - int prevtyp, toktyp; + int prevtyp, toktyp = 0; while (iq.size()) { prev = tok; diff --git a/libserpent/util.cpp b/libserpent/util.cpp index 6ca39de9d..512e53317 100644 --- a/libserpent/util.cpp +++ b/libserpent/util.cpp @@ -205,7 +205,7 @@ std::string get_file_contents(std::string filename) { std::string contents; in.seekg(0, std::ios::end); - contents.resize(in.tellg()); + contents.resize((size_t)in.tellg()); in.seekg(0, std::ios::beg); in.read(&contents[0], contents.size()); in.close(); diff --git a/windows/Alethzero.vcxproj b/windows/Alethzero.vcxproj index 8008c9e01..06c78c4da 100644 --- a/windows/Alethzero.vcxproj +++ b/windows/Alethzero.vcxproj @@ -171,6 +171,9 @@ {df3c5b07-a1a2-4f16-b37f-a27333622cdd} + + {f174e81a-2a66-4693-b917-11bb42d3658c} + diff --git a/windows/Alethzero.vcxproj.filters b/windows/Alethzero.vcxproj.filters index 308b3feb2..e8f008522 100644 --- a/windows/Alethzero.vcxproj.filters +++ b/windows/Alethzero.vcxproj.filters @@ -18,7 +18,6 @@ - @@ -31,5 +30,6 @@ Windows + \ No newline at end of file diff --git a/windows/Ethereum.sln b/windows/Ethereum.sln index b600c0a50..dfe54a772 100644 --- a/windows/Ethereum.sln +++ b/windows/Ethereum.sln @@ -31,6 +31,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eth", "Eth.vcxproj", "{C60C EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "neth", "Neth.vcxproj", "{90C70663-7181-4E99-9079-54188CEB8954}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSerpent", "LibSerpent.vcxproj", "{F174E81A-2A66-4693-B917-11BB42D3658C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -135,6 +137,14 @@ Global {90C70663-7181-4E99-9079-54188CEB8954}.Release|Win32.Build.0 = Release|Win32 {90C70663-7181-4E99-9079-54188CEB8954}.Release|x64.ActiveCfg = Release|x64 {90C70663-7181-4E99-9079-54188CEB8954}.Release|x64.Build.0 = Release|x64 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Debug|Win32.ActiveCfg = Debug|Win32 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Debug|Win32.Build.0 = Debug|Win32 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Debug|x64.ActiveCfg = Debug|x64 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Debug|x64.Build.0 = Debug|x64 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Release|Win32.ActiveCfg = Release|Win32 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Release|Win32.Build.0 = Release|Win32 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Release|x64.ActiveCfg = Release|x64 + {F174E81A-2A66-4693-B917-11BB42D3658C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -146,6 +156,7 @@ Global {1CC213A4-3482-4211-B47B-172E90DAC7DE} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560} {1B1CA20E-39C3-4D9B-AC37-3783048E6672} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560} {DF3C5B07-A1A2-4F16-B37F-A27333622CDD} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560} + {F174E81A-2A66-4693-B917-11BB42D3658C} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560} {3BF049F8-AF7E-4E1C-9627-3E94C887AF24} = {6838FA95-01BF-4FF7-914C-FC209B81406E} {3F3E389B-88DE-41D5-A73B-4F6036E18B36} = {6838FA95-01BF-4FF7-914C-FC209B81406E} EndGlobalSection diff --git a/windows/LibEthereum.props b/windows/LibEthereum.props index 9bb2482e7..eafe922e4 100644 --- a/windows/LibEthereum.props +++ b/windows/LibEthereum.props @@ -11,14 +11,14 @@ - 4068;4100;4127;4258;4244;4267;4505;4512;4706;4714 - Level4 + 4068;4244;4267 true false - include/$(ProjectName);$(IntDir);..;../libethcore;../libethereum;../libethsupport;$(BoostDir);../../leveldb/include;../../cryptopp;../secp256k1;../../miniupnp + include/$(ProjectName);$(IntDir);../../cryptopp;..;../libethcore;../libethereum;../libethsupport;$(BoostDir);../../leveldb/include;../secp256k1;../../miniupnp ETH_BUILD_PLATFORM=Windows/VS2013;ETH_BUILD_TYPE=$(Configuration)-$(Platform);STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;%(PreprocessorDefinitions) true true + Level3 $(BoostDir)/stage/$(Platform) diff --git a/windows/LibEthereum.vcxproj b/windows/LibEthereum.vcxproj index 387380bbe..8eb809721 100644 --- a/windows/LibEthereum.vcxproj +++ b/windows/LibEthereum.vcxproj @@ -22,7 +22,19 @@ - + + + + + + + + + + + + + @@ -35,18 +47,7 @@ - - - - - - - - - - - - + @@ -64,11 +65,28 @@ + + - + + + + + + + + + + + + + + + + @@ -81,24 +99,12 @@ - - - - - - - - - - - - - - - + + + diff --git a/windows/LibEthereum.vcxproj.filters b/windows/LibEthereum.vcxproj.filters index 13881c377..c4478f979 100644 --- a/windows/LibEthereum.vcxproj.filters +++ b/windows/LibEthereum.vcxproj.filters @@ -49,44 +49,56 @@ libethcore - - libethcore + + libevm + + + libevm + + + libevm - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libevmface - - libethsupport + + libethcore - - libethsupport + + libethcore - - libethsupport + + libethcore - - libethsupport + + libethcore - - libethsupport + + libethcore + + + libethcore + + + libethcore liblll @@ -103,15 +115,6 @@ liblll - - libevm - - - libevm - - - libevm - @@ -165,53 +168,77 @@ libethcore - - libethcore + + libevm - - libethsupport + + libevm - - libethsupport + + libevm - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libethential - - libethsupport + + libevm - - libethsupport + + libevmface - - libethsupport + + libethcore + + + libethcore + + + libethcore + + + libethcore + + + libethcore + + + libethcore + + + libethcore + + + libethcore + + + libethcore - - libethsupport + + liblll liblll @@ -231,15 +258,6 @@ liblll - - libevm - - - libevm - - - libevm - @@ -251,14 +269,17 @@ {b246b3d7-af02-4125-a254-2b377214c288} - - {5f2cd0c1-a3e9-497e-83c4-e56d6c0f835f} - - - {0186fc6c-68b3-4cbc-90f2-e01193d853b2} - {37c37803-1515-47c1-b7e6-3879f4429ab3} + + {ed9ad1b3-700c-47f9-8548-a90b5ef179ac} + + + {35c32f6c-3f19-4603-8084-1b88ec9ae498} + + + {e6332606-e0ca-48aa-8a6b-303971ba7a93} + \ No newline at end of file diff --git a/windows/LibSerpent.vcxproj b/windows/LibSerpent.vcxproj new file mode 100644 index 000000000..925d4915b --- /dev/null +++ b/windows/LibSerpent.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + {1cc213a4-3482-4211-b47b-172e90dac7de} + + + {27014763-955d-486b-9ba7-69872192e6f4} + + + {1b1ca20e-39c3-4d9b-ac37-3783048e6672} + + + {1e1175bb-c4a9-41d8-b2d1-9022f71d3cea} + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + Win32Proj + LibSerpent + {F174E81A-2A66-4693-B917-11BB42D3658C} + + + + StaticLibrary + true + v120 + + + StaticLibrary + true + v120 + + + StaticLibrary + false + v120 + + + StaticLibrary + false + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + Use + stdafx.h + + + Windows + true + + + + + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + stdafx.h + Use + + + Windows + true + + + + + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + Use + stdafx.h + + + Windows + true + true + true + + + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + Use + stdafx.h + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/windows/LibSerpent.vcxproj.filters b/windows/LibSerpent.vcxproj.filters new file mode 100644 index 000000000..65df02da3 --- /dev/null +++ b/windows/LibSerpent.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {20ea55ad-2a66-41df-a64e-9fed221f544f} + + + + + Windows + + + + + Windows + + + \ No newline at end of file