Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Compiling latest trunk with MSVC 2008: not easy
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jcooper  
View profile  
 More options Jul 20 2012, 3:56 pm
From: jcooper <josephcoo...@gmail.com>
Date: Fri, 20 Jul 2012 12:56:49 -0700 (PDT)
Local: Fri, Jul 20 2012 3:56 pm
Subject: Compiling latest trunk with MSVC 2008: not easy

I just pulled down the latest trunk in order to prepare a patch for
submission.  I ran 'premake4 --with-demos vs2008' and then hit 'build' in
the resulting solution file.  
1) As mentioned before, the compiler complains that 'precision.h' is
missing.  Premake creates config.h.  I think it should also create
precision.h, even if it's just an empty header file.  The .lua file seems
flexible enough for that.
2) After I created that file, it complained that I don't have
<inttypes.h>.  That header didn't gain MS support until vs2010.  Of course,
premake4 doesn't provide a vs2010 option...  So I pulled down the
msinttypes files from google code.  
3) Then everything compiled, except for the "demo_convex" because its .cpp
file is named "demo_convex_cd.cpp" but its "premake4.lua" is just "convex"
instead of "convex_cd".
4) Changing the name within the .lua file (and recreating the solution
file) leads to the complaint that 'dCollideConvexConvex' and
'dCollideBoxBox' are unresolved externals because they're not exposed by
the .dll API.  
Changing to static linking fixes this and finally everything compiles and
seems to run.

5) However, if I want to use the .dll interface, I can just ignore the
convex_demo.  However, the library still won't run in .dll mode.  It seems
that dOU_ENABLED and dATOMICS_ENABLED are now defined in 'config.h' by
default regardless of the '--with-ou' option passed to premake.  The
library won't compile if they're not defined because of the atomic stuff
used in 'util.cpp'.  However, it seems that 'ou/platform.h' has an extra
entry: '_OU_TARGET_OS_IOS' (line 40) that isn't accounted for in
'ou/test/outest.cpp' (around lines 8742,8754) so when the .dll initializes,
an assert in 'ou/enumarrays.h' (line 166) vomits because there aren't
enough elements in the 'm_aetElementArray'.  The target architecture checks
also need to be update.  These checks seem to be bypassed when the library
is statically linked.  Once the 4 offending enums are fixed, you can
finally run "BoxStack" with a dynamically linked version of the library.  

This kind of seems like a lot of hurdles to have sitting in the default
trunk configuration for msvc.  I can create a patch (although I don't know
what to do about <inttypes.h>), but perhaps someone with commit access
could just make the fixes?

jc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleh Derevenko  
View profile  
 More options Jul 20 2012, 4:12 pm
From: Oleh Derevenko <Oleh.Dereve...@eleks.com>
Date: Fri, 20 Jul 2012 23:12:17 +0300
Local: Fri, Jul 20 2012 4:12 pm
Subject: Re: [ode-users] Compiling latest trunk with MSVC 2008: not easy

OK. Thanks for the investigation. I thought that the problem with <inttypes.h> was because my VS2005 installation was damaged. It's good to know it's VS2010 stuff.

I'll take care about arrays in OU tests and inttypes.h inclusion - that's my code.

      Oleh Derevenko
      -- Skype with underscore


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikko Rasa  
View profile  
 More options Jul 20 2012, 4:26 pm
From: Mikko Rasa <t...@tdb.fi>
Date: Fri, 20 Jul 2012 23:26:12 +0300
Local: Fri, Jul 20 2012 4:26 pm
Subject: Re: [ode-users] Compiling latest trunk with MSVC 2008: not easy
On 20.07.2012 22:56, jcooper wrote:

> although I don't know what to do about <inttypes.h>

That's a tough nut to crack.  First I'll note that you probably want
<stdint.h>, which provides the actual types.  <inttypes.h> provides some
C-style functions to convert strings to integers.

ODE's internals are written in C++, and C++98 does not know about
<inttypes.h> nor <stdint.h>.  C++11 does provide <cstdint>.  <cinttypes>
doesn't exist because the string-to-int conversions are handled through
iostreams.  However, C++11 support was introduced in VS2010, so this
won't help with earlier versions.

The <inttypes.h> and <stdint.h> headers come from C99.  ODE's external
API is C, so we could say it's C99 and get <stdint.h> that way.  But
Visual Studio didn't support C99 either prior to the 2010 edition, so
this again won't help.

That leaves the option of shipping our own version of the integer types.
  It appears odeconfig.h already defines these; maybe that could be used
in one way or another?

It's also possible to use some template magic to obtain sized integer
types in C++ in a platform-independent way, but that may not be a usable
approach if the types need to be used in a C header.

--
Mikko


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel K. O.  
View profile  
 More options Jul 20 2012, 7:57 pm
From: "Daniel K. O." <danielko.lis...@gmail.com>
Date: Fri, 20 Jul 2012 19:57:16 -0400
Local: Fri, Jul 20 2012 7:57 pm
Subject: Re: [ode-users] Compiling latest trunk with MSVC 2008: not easy
On 07/20/2012 03:56 PM, jcooper wrote:

> I just pulled down the latest trunk in order to prepare a patch for
> submission.  I ran 'premake4 --with-demos vs2008' and then hit 'build'
> in the resulting solution file.
> 1) As mentioned before, the compiler complains that 'precision.h' is
> missing.  Premake creates config.h.  I think it should also create
> precision.h, even if it's just an empty header file.  The .lua file
> seems flexible enough for that.

The lua script has the code to generate the precision.h header when only
one precision is requested. It should not be too hard to handle the case
with two precision builds.

I noticed the other broken stuffs int he MSVC builds some time ago, even
mentioned when I did the precision.h thing. I can't survive long enough
in Windows to try to fix it though.

--
Daniel K. O.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleh Derevenko  
View profile  
 More options Jul 21 2012, 8:32 am
From: Oleh Derevenko <Oleh.Dereve...@eleks.com>
Date: Sat, 21 Jul 2012 15:32:05 +0300
Local: Sat, Jul 21 2012 8:32 am
Subject: Re: [ode-users] Compiling latest trunk with MSVC 2008: not easy

Hi

Issues with OU tests and inttypes.h inclusion have been fixed.

Also, I've made a workaround to let precision.h be generated for MSVC without specifying --only-single or --only-double. You are free (especially Daniel is) to make further corrections if necessary.

Also, there was a code fragment in .lua script like this
  -- special validation for Xcode  
  if _ACTION == "xcode3" and (not _OPTIONS["only-single"] and not _OPTIONS["only-double"]) then
    error(
   "Xcode does not support different library types in a single project.\n" ..
   "Please use one of the flags: --only-static or --only-shared", 0)
  end
with condition testing for --only-single and --only-double but message referring to --only-static and --only-shared. I've changed both to --only-static and --only-shared. Fill free to change it the other way if it is more correct.

      Oleh Derevenko
      -- Skype with underscore


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jcooper  
View profile  
 More options Jul 21 2012, 4:11 pm
From: jcooper <josephcoo...@gmail.com>
Date: Sat, 21 Jul 2012 13:11:30 -0700 (PDT)
Local: Sat, Jul 21 2012 4:11 pm
Subject: Re: [ode-users] Compiling latest trunk with MSVC 2008: not easy

The trunk compiles much more cleanly now.  The convex demo still has some
issues, but that's not a big problem.

jc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »