c++ - Box2D static library project installation issues -


hey took following steps:

  • downloaded box2d 2.1.2 , used cmake build msvs++ projectiles
  • built box2d.sln under debug , release, didn't touch libs or dlls
  • made new win32 project, , copied code "hello world" included in box2d download new projects main source file
  • added include directory same source code used cmake generate projects
  • added project "box2d" (the static library project) sollution modify library's code; generated cmake
  • added "box2d" refrence under new projects common properties
  • looked @ "box2d"'s librarian properties , set 'link library dependencies' yes
  • pondered question put comment above includes (please answer too!)

here's hello world.cpp (please answer question in comment)

/* i've added "box2d" project generated cmake, includes      same files in folder include directory points to, alter code.     mean should change <box2d\box2d.h> "box2d.h" ?  */ #include <box2d\box2d.h> #include "stdafx.h" #include <cstdio>  int main(int argc, char** argv) {     b2_not_used(argc);     b2_not_used(argv);      // define gravity vector.     b2vec2 gravity(0.0f, -10.0f);      // want let bodies sleep?     bool dosleep = true;           // blah blah, rest of code doesn't matter } 

however when trying run errors such as

1>c:\libraries , headers\box2d_v2.1.2\box2d_v2.1.2\box2d\build\box2d helloworld\box2d helloworld\box2d helloworld.cpp(30): error c3861: 'b2_not_used': identifier not found 

which undefined identifiers defined in many headers included in box2d.h. why doesn't see them?

found problem: didn't see warning saying box2d.h skipped because placed before stafx.h; switched order of includes.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -