CMakeFiles.txt errors + MinGW compilation

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

CMakeFiles.txt errors + MinGW compilation

Postby arkdemon » Tue Jul 15, 2014 3:50 am

Hello everybody. I have tried updating Newton on my computer but it seems that the CMakeFile.txt need to be updated because they include the directory "Packages" but there is no cmakefiles.txt in it. It is nearly the same for the folder"meshUtil": it is included but is not part of the compilation.
the "package" "error" leads to this (on MSVC 2008 and MinGW 4.8.2 and CMake 2.8.12.1 GUI):
Code: Select all
CMake Error at coreLibrary_300/CMakeLists.txt:12 (add_subdirectory):
  add_subdirectory given source
  "C:/Users/a/Downloads/newton-dynamics-master/coreLibrary_300/source/ai"
  which is not an existing directory.


CMake Error at packages/CMakeLists.txt:11 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dAILibrary

  does not contain a CMakeLists.txt file.


CMake Error at packages/CMakeLists.txt:12 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dAnimation

  does not contain a CMakeLists.txt file.


CMake Error at packages/CMakeLists.txt:13 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dContainers

  does not contain a CMakeLists.txt file.


CMake Error at packages/CMakeLists.txt:14 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dCustomJoints

  does not contain a CMakeLists.txt file.


CMake Error at packages/CMakeLists.txt:16 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dNewton

  does not contain a CMakeLists.txt file.


CMake Error at packages/CMakeLists.txt:17 (add_subdirectory):
  The source directory

    C:/Users/a/Downloads/newton-dynamics-master/packages/dScene

  does not contain a CMakeLists.txt file.


and the "meshutil" error leads to a bunch of undefined reference on Newton.cpp.
There is also an error with the inclusion of sse (it can't include it) on MinGW; to resolve it, I added these lines to the CMakeFile.txt of the global folder:

Code: Select all
if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -O2 -g -msse -msse3 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant")
add_definitions(-D_MINGW_32_VER -D_NEWTON_STATIC_LIB)
endif()


(I added _NEWTON_STATIC_LIB because we can't configure it on CMake and it causes a number of errors with _dllimport and _MINGW_32_VER or we have some sse errors
And for the first line, eg CMAKE_CXX_FLAGS, I tried to include the flags but I am not sure it is like this)

and finally, to resolve the meshutil(or mesheffect) error, I copied the files into the Newton folder and included dgMeshEffect.h in Newton.cpp.

So my question is: is there another "cleaner" way to compile Newton for MinGW? (I gave you my approach but it causes a *notrespondingapp* :P, for example whenever I add a NewtonBody that is not static, the aplication stops responding but doesn't crash which makes debugging useless.

Thank you for your answers :)

PS: And is it possible to put the demoSandbox binaries again in the project? Thanks :)
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm

Re: CMakeFiles.txt errors + MinGW compilation

Postby arkdemon » Thu Jul 17, 2014 11:25 am

I found a "cleaner" way to compile Newton :D with the Makefile (there were errors before).
It wouldn't compile because there was several "missing separator" errors which came from missing tabs (there were spaces at their place and the compiler did not like it). So I replaced the starting spaces of the faulty lines by tabs and now it compiles correctly ^^
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm

Re: CMakeFiles.txt errors + MinGW compilation

Postby Julio Jerez » Thu Jul 17, 2014 12:23 pm

when I build in Linux they work, but some time I find the same problem with end of line characters.
which make file is that?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CMakeFiles.txt errors + MinGW compilation

Postby arkdemon » Thu Jul 17, 2014 12:38 pm

the newton-dynamics-master\coreLibrary_300\projects\mingw32. (There is no more the win32 / linux folder anymore)
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests