C / MinGW

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: C / MinGW

Postby 3TATUK » Sat Sep 07, 2013 5:19 pm

This is what I get with CMake from the SVN...

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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dAILibrary

  does not contain a CMakeLists.txt file.


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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dAnimation

  does not contain a CMakeLists.txt file.


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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dContainers

  does not contain a CMakeLists.txt file.


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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dCustomJoints

  does not contain a CMakeLists.txt file.


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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dNewton

  does not contain a CMakeLists.txt file.


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

    C:/Documents and Settings/Ztatik Oh Light/Desktop/Hexer/libs/newton/newton-dynamics-read-only/packages/dScene

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!


What i'm saying is that you don't have a mingw project in /windows/ ...only VS? :(

I tried changing _POSIX_VER to _MINGW_32_VER and get this:

Code: Select all
../../source/core/dgAABBPolygonSoup.cpp:1:0: warning: -fpic ignored for target (all code is position independent) [enabled by default]

In file included from ../../source/core/dgStdafx.h:25:0,

                 from ../../source/core/dgAABBPolygonSoup.cpp:22:

../../source/core/dgTypes.h: In function 'dgInt32 dgAtomicExchangeAndAdd(dgInt32*, dgInt32)':

../../source/core/dgTypes.h:765:63: error: '_InterlockedExchangeAdd' was not declared in this scope

../../source/core/dgTypes.h: In function 'dgInt32 dgInterlockedExchange(dgInt32*, dgInt32)':

../../source/core/dgTypes.h:777:49: error: '_InterlockedExchange' was not declared in this scope

../../source/core/dgTypes.h: In function 'void PrefetchMem(const void*)':

../../source/core/dgTypes.h:794:35: error: '_MM_HINT_T0' was not declared in this scope

../../source/core/dgTypes.h:794:46: error: '_mm_prefetch' was not declared in this scope

In file included from ../../source/core/dgMatrix.h:28:0,

                 from ../../source/core/dgAABBPolygonSoup.cpp:26:

../../source/core/dgVector.h: At global scope:

../../source/core/dgVector.h:599:27: error: '__m128' does not name a type

../../source/core/dgVector.h:599:34: error: ISO C++ forbids declaration of 'type' with no type [-fpermissive]

../../source/core/dgVector.h:604:27: error: '__m128i' does not name a type

../../source/core/dgVector.h:604:35: error: ISO C++ forbids declaration of 'type' with no type [-fpermissive]

../../source/core/dgVector.h:604:12: error: 'dgVector::dgVector(int)' cannot be overloaded

../../source/core/dgVector.h:599:12: error: with 'dgVector::dgVector(int)'

../../source/core/dgVector.h:930:3: error: '__m128' does not name a type

../../source/core/dgVector.h:931:3: error: '__m128i' does not name a type

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(int)':

../../source/core/dgVector.h:600:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(int)':

../../source/core/dgVector.h:605:4: error: class 'dgVector' does not have any field named 'm_typeInt'

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(dgFloat32)':

../../source/core/dgVector.h:610:5: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:610:25: error: '_mm_set_ps1' was not declared in this scope

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(const dgFloat32*)':

../../source/core/dgVector.h:615:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:615:28: error: '_mm_loadu_ps' was not declared in this scope

../../source/core/dgVector.h:617:3: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:617:46: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:617:52: error: '_mm_and_ps' was not declared in this scope

../../source/core/dgVector.h: In copy constructor 'dgVector::dgVector(const dgVector&)':

../../source/core/dgVector.h:621:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:621:16: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(const dgBigVector&)':

../../source/core/dgVector.h:627:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:627:108: error: '_mm_set_ps' was not declared in this scope

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(dgFloat32, dgFloat32, dgFloat32, dgFloat32)':

../../source/core/dgVector.h:632:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:632:32: error: '_mm_set_ps' was not declared in this scope

../../source/core/dgVector.h: In constructor 'dgVector::dgVector(dgInt32, dgInt32, dgInt32, dgInt32)':

../../source/core/dgVector.h:637:4: error: class 'dgVector' does not have any field named 'm_type'

../../source/core/dgVector.h:637:92: error: '_mm_set_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::Scale3(dgFloat32) const':

../../source/core/dgVector.h:645:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:645:34: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:645:40: error: '_mm_mul_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::Scale4(dgFloat32) const':

../../source/core/dgVector.h:650:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:650:43: error: '_mm_set_ps1' was not declared in this scope

../../source/core/dgVector.h:650:44: error: '_mm_mul_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator+(const dgVector&) const':

../../source/core/dgVector.h:670:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:670:32: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:670:38: error: '_mm_add_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator-(const dgVector&) const':

../../source/core/dgVector.h:676:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:676:32: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:676:38: error: '_mm_sub_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector& dgVector::operator+=(const dgVector&)':

../../source/core/dgVector.h:681:31: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:681:41: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:681:47: error: '_mm_add_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector& dgVector::operator-=(const dgVector&)':

../../source/core/dgVector.h:686:31: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:686:41: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:686:47: error: '_mm_sub_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator*(const dgVector&) const':

../../source/core/dgVector.h:713:50: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:713:66: error: '_MM_SHUFFLE' was not declared in this scope

../../source/core/dgVector.h:713:89: error: '_mm_shuffle_ps' was not declared in this scope

../../source/core/dgVector.h:713:110: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:713:120: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:713:152: error: '_mm_mul_ps' was not declared in this scope

../../source/core/dgVector.h:714:98: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:714:108: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:714:141: error: '_mm_sub_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::CompProduct3(const dgVector&) const':

../../source/core/dgVector.h:760:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:760:34: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:760:40: error: '_mm_mul_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::Reciproc() const':

../../source/core/dgVector.h:765:28: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:765:36: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:765:42: error: '_mm_div_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::CompProduct4(const dgVector&) const':

../../source/core/dgVector.h:771:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:771:32: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:771:38: error: '_mm_mul_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::AddHorizontal() const':

../../source/core/dgVector.h:776:30: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:776:44: error: '_mm_hadd_ps' was not declared in this scope

../../source/core/dgVector.h:777:27: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:777:39: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h: In member function 'dgVector dgVector::Abs() const':

../../source/core/dgVector.h:784:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:784:41: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:784:47: error: '_mm_and_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::GetMax(const dgVector&) const':

../../source/core/dgVector.h:789:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:789:35: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:789:41: error: '_mm_max_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::GetMin(const dgVector&) const':

../../source/core/dgVector.h:794:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:794:35: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:794:41: error: '_mm_min_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgInt32 dgVector::GetInt() const':

../../source/core/dgVector.h:799:25: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:799:31: error: '_mm_cvtss_si32' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::TestZero() const':

../../source/core/dgVector.h:804:27: error: 'm_typeInt' was not declared in this scope

../../source/core/dgVector.h:804:66: error: 'class dgVector' has no member named 'm_typeInt'

../../source/core/dgVector.h:804:75: error: '_mm_cmpeq_epi32' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::Floor() const':

../../source/core/dgVector.h:810:39: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:810:52: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:810:58: error: '_mm_add_ps' was not declared in this scope

../../source/core/dgVector.h:810:66: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:810:72: error: '_mm_sub_ps' was not declared in this scope

../../source/core/dgVector.h:811:46: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:811:52: error: '_mm_cmplt_ps' was not declared in this scope

../../source/core/dgVector.h:812:25: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:812:59: error: '_mm_set_ps1' was not declared in this scope

../../source/core/dgVector.h:812:69: error: 'class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:812:75: error: '_mm_and_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::InvSqrt() const':

../../source/core/dgVector.h:823:31: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:823:37: error: '_mm_rsqrt_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator>(const dgVector&) const':

../../source/core/dgVector.h:836:24: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:836:37: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:836:43: error: '_mm_cmpgt_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator==(const dgVector&) const':

../../source/core/dgVector.h:841:24: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:841:37: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:841:43: error: '_mm_cmpeq_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator<(const dgVector&) const':

../../source/core/dgVector.h:846:24: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:846:37: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:846:43: error: '_mm_cmplt_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator>=(const dgVector&) const':

../../source/core/dgVector.h:851:24: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:851:37: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:851:43: error: '_mm_cmpge_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator<=(const dgVector&) const':

../../source/core/dgVector.h:856:24: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:856:37: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:856:43: error: '_mm_cmple_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator&(const dgVector&) const':

../../source/core/dgVector.h:862:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:862:35: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:862:41: error: '_mm_and_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator|(const dgVector&) const':

../../source/core/dgVector.h:867:21: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:867:34: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:867:40: error: '_mm_or_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator^(const dgVector&) const':

../../source/core/dgVector.h:872:22: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:872:35: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:872:41: error: '_mm_xor_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::AndNot(const dgVector&) const':

../../source/core/dgVector.h:877:30: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:877:38: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:877:44: error: '_mm_andnot_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgInt32 dgVector::GetSignMask() const':

../../source/core/dgVector.h:882:26: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:882:32: error: '_mm_movemask_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::ShiftTripleRight() const':

../../source/core/dgVector.h:887:25: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:887:41: error: '_MM_SHUFFLE' was not declared in this scope

../../source/core/dgVector.h:887:64: error: '_mm_shuffle_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::MoveLow(const dgVector&) const':

../../source/core/dgVector.h:893:25: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:893:38: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:893:44: error: '_mm_movelh_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::MoveHigh(const dgVector&) const':

../../source/core/dgVector.h:898:25: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:898:38: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:898:44: error: '_mm_movehl_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::PackLow(const dgVector&) const':

../../source/core/dgVector.h:903:27: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:903:40: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:903:46: error: '_mm_unpacklo_ps' was not declared in this scope

../../source/core/dgVector.h: In member function 'dgVector dgVector::PackHigh(const dgVector&) const':

../../source/core/dgVector.h:908:27: error: 'm_type' was not declared in this scope

../../source/core/dgVector.h:908:40: error: 'const class dgVector' has no member named 'm_type'

../../source/core/dgVector.h:908:46: error: '_mm_unpackhi_ps' was not declared in this scope

In file included from ../../source/core/dgAABBPolygonSoup.cpp:27:0:

../../source/core/dgAABBPolygonSoup.h: In constructor 'dgAABBPolygonSoup::dgNode::dgNode()':

../../source/core/dgAABBPolygonSoup.h:99:17: warning: passing NULL to non-pointer argument 1 of 'dgAABBPolygonSoup::dgNode::dgLeafNodePtr::dgLeafNodePtr(dgUnsigned32)' [-Wconversion-null]

../../source/core/dgAABBPolygonSoup.h:99:17: warning: passing NULL to non-pointer argument 1 of 'dgAABBPolygonSoup::dgNode::dgLeafNodePtr::dgLeafNodePtr(dgUnsigned32)' [-Wconversion-null]

In file included from ../../source/core/dgMatrix.h:28:0,

                 from ../../source/core/dgAABBPolygonSoup.cpp:26:

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator>=(const dgVector&) const':

../../source/core/dgVector.h:852:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator<=(const dgVector&) const':

../../source/core/dgVector.h:857:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgInt32 dgVector::GetSignMask() const':

../../source/core/dgVector.h:883:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator-(const dgVector&) const':

../../source/core/dgVector.h:677:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::CompProduct4(const dgVector&) const':

../../source/core/dgVector.h:772:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::GetMax(const dgVector&) const':

../../source/core/dgVector.h:790:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::ShiftTripleRight() const':

../../source/core/dgVector.h:888:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::GetMin(const dgVector&) const':

../../source/core/dgVector.h:795:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator<(const dgVector&) const':

../../source/core/dgVector.h:847:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::AndNot(const dgVector&) const':

../../source/core/dgVector.h:878:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator&(const dgVector&) const':

../../source/core/dgVector.h:863:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator|(const dgVector&) const':

../../source/core/dgVector.h:868:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator+(const dgVector&) const':

../../source/core/dgVector.h:671:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::AddHorizontal() const':

../../source/core/dgVector.h:778:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::operator*(const dgVector&) const':

../../source/core/dgVector.h:716:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::Scale4(dgFloat32) const':

../../source/core/dgVector.h:651:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::Abs() const':

../../source/core/dgVector.h:785:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::Reciproc() const':

../../source/core/dgVector.h:766:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector& dgVector::operator-=(const dgVector&)':

../../source/core/dgVector.h:687:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector& dgVector::operator+=(const dgVector&)':

../../source/core/dgVector.h:682:2: warning: control reaches end of non-void function [-Wreturn-type]

../../source/core/dgVector.h: In member function 'dgVector dgVector::Scale3(dgFloat32) const':

../../source/core/dgVector.h:646:2: warning: control reaches end of non-void function [-Wreturn-type]

make: *** [../../source/core/dgAABBPolygonSoup.o] Error 1
3TATUK
 
Posts: 22
Joined: Thu Sep 05, 2013 11:55 pm

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 6:48 pm

it need the intrisic headers for MinWG, I think they are the same that for Linux, sync of edit file dgTypes

#if (defined (_POSIX_VER) || defined (_POSIX_VER_64) || defined (_MINGW_32_VER) || defined (_MINGW_64_VER))
#include <unistd.h>
#include <assert.h>
extern "C"
{
// for SSE3 and up
#include <pmmintrin.h>
#include <emmintrin.h>
#include <mmintrin.h>
}
#endif
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 6:56 pm

is this the MinG Wthat you are using? http://www.mingw.org
version -4.7.2
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 7:04 pm

what baffled me is that you insist on using a subsystem that is half baked subsustem between windows and Unix, even say that on eth download.
MinGW compilers provide access to the functionality of the Microsoft C runtime and some language-specific runtimes. MinGW, being Minimalist, does not, and never will, attempt to provide a POSIX runtime environment for POSIX application deployment on MS-Windows. If you want POSIX application deployment on this platform, please consider Cygwin instead.


The make file compile on many standard Posit system. why don't you use Cygwin?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 7:11 pm

I am downloading version 4.8.1 to see why is does work
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 8:27 pm

Ok I dwopnload mingw and I copy the POSIX make file to the mingw folder.
The I edited it to make minwg, and the only function I have to change was
_InterlockedExchangeAdd that in mingw is not an intrinsic, so I replaced with InterlockedExchangeAdd
I do no have any of the error that you mention with typedef decalrations.

anyway, after compiled I when a remove a couple of assert of some variables that were assigned but never use (gcc 4.8.1 is very good now)
now the complete library build, but does not link, because I have to go an fiugire ou the make file for pthreads.
In posit system this is a system library, onb windows I have a windows version, I do not know if Mingw provide a version.

I try to figure that out tomorrow, but you houdl be able to figure out as well.
Sync to SVN an open folder ../newton-dynamics\coreLibrary_300\projects\minwg
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sat Sep 07, 2013 8:55 pm

Ok I added the pthread file to the mak efile and now it build the library, but some how it is failing building the dll
I get these error
cp libNewton.a ../../../packages/wingwg32/libNewton.a
process_begin: CreateProcess(NULL, cp libNewton.a ../../../packages/wingwg32/libNewton.a, ...) failed.
make (e=2): The system cannot find the file specified.
makefile:192: recipe for target 'libNewton.a' failed
mingw32-make: *** [libNewton.a] Error 2


however it does build the static library libNewton.a

I need to find out how to conver library to dll in mingw, the instructions in the make file are for Linux
$(COMPILER) -shared -Wl,-soname,libNewton.so $? -o libNewton.so
cp libNewton.so ../../../packages/$(INSTALL_PATH)/libNewton.so


if you know how please let me know. but I believe you can just use the static library
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby 3TATUK » Sun Sep 08, 2013 1:51 am

Newton itself compiles with g++ and the new makefile just fine ( you have a typo "minwg" instead of "mingw )... But

When INCLUDING #include "Newton.h" into a C program to compile as C with gcc then i get the typedef errors

Code: Select all
error: unknown type name 'NewtonUniversalCallback'


etc.
3TATUK
 
Posts: 22
Joined: Thu Sep 05, 2013 11:55 pm

Re: C / MinGW

Postby Julio Jerez » Sun Sep 08, 2013 8:02 am

I modified the make file so that only build static library, I do not know how to make dll with mingw32-make


when you invoke you make file the you need to include the right preprocessors

-DPTW32_BUILD -DPTW32_STATIC_LIB -D_NEWTON_STATIC_LIB -D_MINGW_32_VER

try again,

in you command line type:

mingw32-make clean
mingw32-make

that soudl create a static library, that you soud be able to use with any c or c++ compeiler
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby 3TATUK » Sun Sep 08, 2013 8:37 am

The lib works!! I've said this already!! #include "Newton.h" in C fails! Undefined typedefs! :|

make a file!

test.c

#include <Newton.h>
int main(){}

gcc test.c -lnewton

Undefined!
3TATUK
 
Posts: 22
Joined: Thu Sep 05, 2013 11:55 pm

Re: C / MinGW

Postby Julio Jerez » Sun Sep 08, 2013 9:00 am

3TATUK wrote:#include <Newton.h>
int main(){}

gcc test.c -lnewton

Undefined!


yes and I said that the will not work. Because if you include a newton header file, you need to pass the presprossesor to the compiler

gcc -DPTW32_STATIC_LIB -D_NEWTON_STATIC_LIB -D_MINGW_32_VER test.c -lnewton
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby Julio Jerez » Sun Sep 08, 2013 11:02 am

I am trying to create a make file to build all of the sub project

Code: Select all
PLATFORM = mingw32

# sub project path
NEWTON_CORE_MAKE = ../../../coreLibrary_300/projects/$(PLATFORM)
SDK_MATH_MAKE = ../../../../packages/projects/$(PLATFORM)/dMath
SDK_SCENE_MAKE = ../../../../packages/projects/$(PLATFORM)/dScene
SDK_JOINTS_MAKE = ../../../../packages/projects/$(PLATFORM)/dCustomJoints
SDK_CONTAINERS_MAKE = ../../../../packages/projects/$(PLATFORM)/dContainers
SDK_VISUALDEBUGGER_MAKE = ../../../../packages/projects/$(PLATFORM)/dVisualDebuggerServer
SDK_AILIBRARY_MAKE = ../../../../packages/projects/$(PLATFORM)/dAILibrary
SDK_XML_MAKE = ../../../../packages/projects/$(PLATFORM)/thirdParty/tinyxml

# main target
NetwonSDK :
   make -C $(NEWTON_CORE_MAKE)
#   make -C $(SDK_MATH_MAKE)
#   make -C $(SDK_SCENE_MAKE)
#   make -C $(SDK_CONTAINERS_MAKE)
#   make -C $(SDK_JOINTS_MAKE)   
#   make -C $(SDK_XML_MAKE)

# clean all objects target
clean :
   make -C $(NEWTON_CORE_MAKE) clean
#   make clean -C $(SDK_XML_MAKE)
#   make clean -C $(SDK_MATH_MAKE)
#   make clean -C $(SDK_SCENE_MAKE)
#   make clean -C $(SDK_JOINTS_MAKE)
#   make clean -C $(SDK_CONTAINERS_MAKE)
#   make clean -C $(SDK_VISUALDEBUGGER_MAKE)



but it fail with this error
C:\Users\Julio\Desktop\newton-dynamics\packages\projects\mingw32>mingw32-make clean
make -C ../../../coreLibrary_300/projects/mingw32 clean
process_begin: CreateProcess(NULL, make -C ../../../coreLibrary_300/projects/mingw32 clean, ...) failed.
make (e=2): The system cannot find the file specified.
makefile:43: recipe for target 'clean' failed
mingw32-make: *** [clean] Error 2


I do no know why, some stuff that work in Linux do no relly work the same way with mingw, fo rexample the command rm does not work, I have to use del.
some how invoking othe make files, fail too.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby 3TATUK » Mon Sep 09, 2013 2:03 am

Code: Select all
gcc -DPTW32_STATIC_LIB -D_NEWTON_STATIC_LIB -D_MINGW_32_VER test.c -lnewton


This doesn't work. Obviously you can link newton -lnewton without a problem... But you still can't include Newton.h and if you don't then there's no interface for function calls so there's no point in the -lnewton link.

Code: Select all
In file included from engine/audio/../interface/external.h:35:0,
                 from engine/audio/../interface/includes.h:3,
                 from engine/audio/../interface/interface.h:1,
                 from engine/audio/audio.c:1:
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:112:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonMesh{} NewtonMesh;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:113:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonBody{} NewtonBody;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:114:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonWorld{} NewtonWorld;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:115:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonJoint{} NewtonJoint;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:116:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonMaterial{} NewtonMaterial;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:117:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonCollision{} NewtonCollision;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:118:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonDeformableMeshSegment{} NewtonDeformableMeshSegment;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:119:17: warning: struct has no members [-Wpedantic]
  typedef struct NewtonBreakableComponentMesh{} NewtonBreakableComponentMesh;
                 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:228:4: error: unknown type name 'NewtonBoxParam'
    NewtonBoxParam m_box;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:229:4: error: unknown type name 'NewtonConeParam'
    NewtonConeParam m_cone;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:230:4: error: unknown type name 'NewtonSphereParam'
    NewtonSphereParam m_sphere;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:231:4: error: unknown type name 'NewtonCapsuleParam'
    NewtonCapsuleParam m_capsule;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:232:4: error: unknown type name 'NewtonCylinderParam'
    NewtonCylinderParam m_cylinder;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:233:4: error: unknown type name 'NewtonTaperedCapsuleParam'
    NewtonTaperedCapsuleParam m_taperedCapsule;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:234:4: error: unknown type name 'NewtonTaperedCylinderParam'
    NewtonTaperedCylinderParam m_taperedCylinder;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:235:4: error: unknown type name 'NewtonChamferCylinderParam'
    NewtonChamferCylinderParam m_chamferCylinder;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:236:4: error: unknown type name 'NewtonConvexHullParam'
    NewtonConvexHullParam m_convexHull;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:237:4: error: unknown type name 'NewtonDeformableMeshParam'
    NewtonDeformableMeshParam m_deformableMesh;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:238:4: error: unknown type name 'NewtonCompoundCollisionParam'
    NewtonCompoundCollisionParam m_compoundCollision;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:239:4: error: unknown type name 'NewtonCollisionTreeParam'
    NewtonCollisionTreeParam m_collisionTree;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:240:4: error: unknown type name 'NewtonHeightFieldCollisionParam'
    NewtonHeightFieldCollisionParam m_heightField;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:241:4: error: unknown type name 'NewtonSceneCollisionParam'
    NewtonSceneCollisionParam m_sceneCollision;
    ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:243:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic]
   };
    ^
    ^
In file included from engine/audio/../interface/external.h:35:0,
                 from engine/audio/../interface/includes.h:3,
                 from engine/audio/../interface/interface.h:1,
                 from engine/audio/audio.c:1:
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:346:58: error: unknown type name 'NewtonUserMeshCollisionCollideDesc'
  typedef void (*NewtonUserMeshCollisionCollideCallback) (NewtonUserMeshCollisio
nCollideDesc* const collideDescData);
                                                          ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:347:59: error: unknown type name 'NewtonUserMeshCollisionRayHitDesc'
  typedef dFloat (*NewtonUserMeshCollisionRayHitCallback) (NewtonUserMeshCollisi
onRayHitDesc* const lineDescData);
                                                           ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:348:81: error: unknown type name 'NewtonCollisionInfoRecord'
  typedef void (*NewtonUserMeshCollisionGetCollisionInfo) (void* const userData,
 NewtonCollisionInfoRecord* const infoRecord);

 ^
engine/audio/../interface/../../libs/newton/coreLibrary_300/source/newton/Newton
.h:390:75: error: unknown type name 'NewtonHingeSliderUpdateDesc'
  typedef unsigned (*NewtonHingeCallback) (const NewtonJoint* const hinge, Newto
:


Unless you updated the SVS?
3TATUK
 
Posts: 22
Joined: Thu Sep 05, 2013 11:55 pm

Re: C / MinGW

Postby Julio Jerez » Mon Sep 09, 2013 7:28 am

Then I do not know how to fix that, because on all version of GCC that I had used those types are no problems.
I tried to make those are forward declaration that would be compatible with C and C++, My impression was that those declarations were right
if you know how to make compatible let me know, because I do not know how to make that happens.

I only used with C++ not with C.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C / MinGW

Postby 3TATUK » Mon Sep 09, 2013 7:04 pm

Working Newton.h attached....

http://bpaste.net/raw/tSDymYnhmSw9lCN6eGle/

Code: Select all
undefined reference to `_imp__NewtonBodyGetMassMatrix'
undefined reference to `_imp__NewtonBodySetForce'
undefined reference to `_imp__NewtonCreate'
undefined reference to `_imp__NewtonCreateBox'
undefined reference to `NewtonCreateBody'
undefined reference to `_imp__NewtonBodySetForceAndTorqueCallback'
undefined reference to `_imp__NewtonBodySetMassMatrix'


Are you available on IRC or skype?
3TATUK
 
Posts: 22
Joined: Thu Sep 05, 2013 11:55 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests