Compiling Latest Version / Recompiled Library

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Compiling Latest Version / Recompiled Library

Postby anothertime12 » Tue Nov 27, 2018 11:36 pm

Hi, apologies is this has already been covered but a few searches didn't turn up anything.

There used to be a precompiled version of the library available for download but since the shift to open source that seems to have vanished? We're using visual studio 2008 and I'm not aware of a tool to convert the project files down from 2010 to 2008.

Is it possible to either: have a precompiled version available or offer additional project files? Failing that, is there a tool to convert between visual studio project formats?

We'd like to upgrade from 2.53 to the latest version and take advantage of all the updates and new features. Installing multiple versions of visual studio isn't possible as the installer uninstalls all of our current project work and breaks a lot of things we have set up.

Any help would be appreciated.
anothertime12
 
Posts: 27
Joined: Tue Nov 27, 2018 11:28 pm

Re: Compiling Latest Version / Recompiled Library

Postby Julio Jerez » Tue Nov 27, 2018 11:59 pm

Can you run cmake?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compiling Latest Version / Recompiled Library

Postby Julio Jerez » Wed Nov 28, 2018 12:52 am

I just tried to build the project solution using cmake, I can't make a 2008 solution because I do not have VS2008 installed on my machine, but I selected vs 2010 and I build fine. I assume it is also the case for VS2008 or even 2005.

you onle make the static libraries, I asume that's fine. also since we move to use c++ thread, will will by be able to run in multithread mode. for that yout would need VS 2012 or batter.


anyway if you intall cmake 3.10 or better in your dev system, it is just a matter of drooping the newton folder in cmake gui and will automatically congigure to the current native compiler, in your case 2008, that you can select that various solution options available, it soudl be straightforward.


you need to get the later GitHub version, the cmake scripts do not work w the last release.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compiling Latest Version / Recompiled Library

Postby anothertime12 » Wed Nov 28, 2018 12:49 pm

Hi, thanks for the quick response - that seems to have worked although a few helper libraries didn't compile all of the main things needed are now compiled and working.

I wonder if cmake not working previously was as per the issue you described.

many thanks for this.. I suppose we now have to use the new logo on our loading screen :)
anothertime12
 
Posts: 27
Joined: Tue Nov 27, 2018 11:28 pm

Re: Compiling Latest Version / Recompiled Library

Postby Julio Jerez » Wed Nov 28, 2018 1:01 pm

Is probably the config, I tried static libraries.p
What configuration you try?
Which libraries did not compiled, so that I can try.
Not nice some libraries are plugings that will not build with some older version of visual studio.

For vs2008, the only plug in that will compile is the sad.

As for using logos, you do not need to do anything, newton is a club licence,
It will be nice if you list us in your credits.

I have seem many project that use newton and some how are embarrass to say anything because of the flame wars that immediately open from trolls that contribute zero, but that want to tell the developer how to do their projects.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compiling Latest Version / Recompiled Library

Postby anothertime12 » Wed Nov 28, 2018 1:25 pm

I've not experienced any negativity around Newton for a long time. It seems very stable, I just wish that functions were a bit more robust with inputs (such as passing a null pointer to NewtonUpdate or NewtonDestroy would gracefully return rather than crash).

I'll be sticking the logo right on the loading screen.
anothertime12
 
Posts: 27
Joined: Tue Nov 27, 2018 11:28 pm

Re: Compiling Latest Version / Recompiled Library

Postby Julio Jerez » Wed Nov 28, 2018 4:02 pm

anothertime12 wrote:I'll be sticking the logo right on the loading screen.

I appreciate that, thanks.

yes the cmake was broken, but thank for few users who donate time to make the Linux part,
we now has then usable.

you did not say which libraries made by cmake failed to compile with vs2008, if you can tell me which so that we update the scripts.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compiling Latest Version / Recompiled Library

Postby anothertime12 » Wed Nov 28, 2018 4:36 pm

Having tied up folder structures a bit it seems the only newton specific module that fails is dgNewtonAvx which is likely due to lack of correct headers on our part for _mm256 intrinsics.

IMGUI hasn't got 'int64_t' defined on line 2563 and glfw hasn't got stdint.h. Both of which are most likely due to out environment.

Overall it seems like things for the old 2008 studio to be blamed for.. it is 10 years old though after all.
anothertime12
 
Posts: 27
Joined: Tue Nov 27, 2018 11:28 pm

Re: Compiling Latest Version / Recompiled Library

Postby Julio Jerez » Wed Nov 28, 2018 6:34 pm

ah ok, that's no so bad.
the _mm256 you just need to uncheck, the avx, avx2 and asse4.2 plugins because your compiler does not support this instructions set.

one trick you can do, is that you can build the dlls, and you can use for development, but them when you get a final product you can make a newton solution for VS 2015 of better on another computer , and that will give you a set of dlls that you can use to replace the one generate by VS 2008, this will give you the multithreaded better code generation and the parallel solver that use AVX and AVX2 even on single thread mode. Just a trick.
is does not works if you make static libraries because there code has to be linked and that will still have the illegal instructions.

The other problem I believe is easy to solve , if you look at line 619 of imgui, the code include a different header #include <stddef.h> instead of #include <stdint.h>
is possible that they forget that <stddef.h> does not define int64_t and went unnoticed since vs2008 is so old. I just replaced int64_t with long long which is standard for all compilers.

if you have time just try again see if you can build an run the sandbox demos. so that you can see how the new stuff works.

anyway I hope that works.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests