Errors when running the project on 64-bit Windows 7 SP1

Hello! I am novice in running MaidSafe project so I ask you to help me. I’ve followed all the steps from [here][1] (also got the CBFS key) and now I do have the MaidSafe folder and the output folder (out-of-source build folder) which contains the solution file, all submodules etc. But now I am trying to run the project using a MSVS 2013 Developer Command Prompt like this:
msbuild /P:Configuration=Debug src\Common\ExperCommon.vcxproj
Of course I’ve tried to run other All or Exper submodules but every time several warnings and several errors occured. My result always gets to the [public dashboard][2]

For example, trying to run the AllCommon submodule I’ve received this:

"C:\output\build_maidsafe\src\Common\AllCommon.vcxproj" (default target) (1) ->
"C:\output\build_maidsafe\src\common\address_space_tool.vcxproj" (default targe
t) (3) ->
"C:\output\build_maidsafe\src\common\maidsafe_common.vcxproj" (default target)
(15) ->
(ClCompile target) ->
  C:\MaidSafe\src\common\src\maidsafe\common\crypto.cc(212): error C2220: warni
ng treated as error - no 'object' file generated [C:\output\build_maidsafe\src\
common\maidsafe_common.vcxproj]
  C:\MaidSafe\src\common\src\maidsafe\common\sqlite3_wrapper.cc(135): error C22
20: warning treated as error - no 'object' file generated [C:\output\build_maid
safe\src\common\maidsafe_common.vcxproj]

Please, help me to build the solution and to run the project. Perhaps I do something wrong.
Every time I get mistakes: “no ‘object’ file generated”.
[1]: Build Instructions for Windows · maidsafe-archive/MaidSafe Wiki · GitHub
[2]: http://dash.maidsafe.net/index.php?project=MaidSafe&display=project

Hi there,

I’ve just followed the build instructions you linked to as well to check them. I’m on Windows 8.1, but I can’t see that affecting things to generate the errors you’re seeing.

The output from my terminals is in this Gist if you want a look. To help further, it would be good if you could do something similar so I can see the full output.

I’ve re-done everything and got mistakes anyway. Now another kind of mistake:

Build FAILED.

"C:\TEST\build_maidsafe\build_maidsafe\src\Common\AllCommon.vcxproj" (default t
arget) (1) ->
"C:\TEST\build_maidsafe\build_maidsafe\src\common\address_space_tool.vcxproj" (
default target) (3) ->
"C:\TEST\build_maidsafe\build_maidsafe\src\third_party_libs\cryptopp\cryptopp.v
cxproj" (default target) (14) ->
(Lib target) ->
  C:\TEST\build_maidsafe\build_maidsafe\src\third_party_libs\cryptopp\cryptopp.
dir\Debug\x64dll.obj : fatal error LNK1112: module machine type 'x64' conflicts
 with target machine type 'X86' [C:\TEST\build_maidsafe\build_maidsafe\src\thir
d_party_libs\cryptopp\cryptopp.vcxproj]

Hmm I think you are on 32 bit windows but looks like cryptopp built 64 bit lib for this.

No, I’m on 64bit system for sure…

Weird maybe it means X86_64 (I am not a windows user)

So you advise me to try to build 32-bit version of the project?

No I think everyone is on 64 bit windows (much better to be). This is some other error in this case.

Why not, try that to see if that works.
It seems x86 is already set somewhere (maybe a bug), so if you set the rest to x86 as well, it may well work.
You don’t really need a 64-bit build at this stage…

No - we’ve stopped supporting 32-bit Windows builds I’m afraid. You’ll likely get a pile of warnings about casting from large integral types to smaller ones, and we treat warnings as errors so the build will fail.

So, to get the command prompt to buffer more lines of output, right click on the icon circled below:

Select “properties”. This should bring up the settings dialogue. Just set the screen buffer size height to 9999 (the max) in the layout tab:

If you try that and show us the full output, we’ll maybe be able to progress a bit from there :smile:

Also, check that your VS command prompt has exactly the same title as the one in the image.

1 Like

Finally I have done everything again and same mistakes have occured. Here is my Gist. Please, look through it.
The mistake is still the same:

C:\TEST\MaidSafe\src\common\src\maidsafe\common\sqlite3_wrapper.cc(135): erro
r C2220: warning treated as error - no 'object' file generated [C:\TEST\build_m
aidsafe\src\common\maidsafe_common.vcxproj]

OK - the first slip-up looks to be here:

cmake -H. -B../build_maidsafe -G"Visual Studio 12"

This is telling CMake to prepare a 32-bit solution. You need to add “Win64” to the generator to get it to build a 64-bit version:

cmake -H. -B../build_maidsafe -G"Visual Studio 12 Win64"

Since you’re changing the generator, CMake will require you to delete at least your CMakeCache.txt file which is in the “build_maidsafe” folder. It’s probably safest to delete everything from that folder, except you can keep the Boost tarball (named boost_1_57_0.tar.bz2) if you want to avoid downloading it again.

1 Like

Yes, I always ran 64-bit and the mistakes were the same, but as you can see in the messages above I’ve decided to build 32-bit solution last time. But okay, I will rebuild it again now :smile:

It doesn’t look too bad actually. There are only two errors and both are caused by warnings which get treated as errors. The warnings like this

C:\TEST\MaidSafe\src\common\src\maidsafe\common\crypto.cc(212): warning C4244: 'argument' : conversion from 'CryptoPP::lword' to 'unsigned int', possible loss of data [C:\TEST\build_maidsafe\src\common\maidsafe_common.vcxproj]

are caused by building for 32-bit as I mentioned above. I think on any architecture CryptoPP::lword is 64 bits long. On 64-bit Windows, unsigned int is 64 bits while on 32-bit Windows it’s 32 bits. Hence, only on 32-bit Windows we’re converting a 64-bit variable into a 32-bit one. The compiler’s just letting us know that we could be losing data if the 64-bit variable contains a value that is too big for a 32-bit one to hold.

1 Like

WOW. I have re-done and … build succeeded! Finally, thank you very much!!! :blush:
Now I will try to run other libraries… vcxproj files.

And I also have a question: what’s further? Build is successful, but now am I only able to develop some new applications? As I understand, MaidSafe doesn’t have GUI still…

2 Likes

There’s a fairly significant rewrite happening at the moment, so it’s pretty limited what you can play with. Probably your best bet is to keep an eye on this forum for updates, for example this topic would be good to watch.

2 Likes

So I will run all libraries, for example, and what will I see?
And by the way, how can I run the tests? As I see at the dashboard, the column ‘Test’ opposite to my result is empty.

You can run individual executables in the build directory, or run a site of tests with make ExperCommon - results will be uploaded to the MaidSafe dashboard. The are also some benchmark executables.

See also: I built MaidSafe, now what?

2 Likes

Thank you very much! I like the MaidSafe very much, I expect when the ‘final product’ will be available, because the idea of the project is amazing!

2 Likes

Trying to build local_network_controller I failed :frowning:
Build FAILED.

"C:\TEST\build_maidsafe\src\vault_manager\local_network_controller.vcxproj" (de
fault target) (1) ->
"C:\TEST\build_maidsafe\ZERO_CHECK.vcxproj" (default target) (2) ->
(PlatformPrepareForBuild target) ->
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform
.targets(61,5): error MSB8013: This project doesn't contain the Configuration a
nd Platform combination of Build|x64. [C:\TEST\build_maidsafe\ZERO_CHECK.vcxpro
j]