Ode error.

280 views
Skip to first unread message

Awish

unread,
Sep 16, 2008, 8:05:10 PM9/16/08
to ode-users
hi,
Iam a little confused as to how do I add the drawstuff and Ode files
on to a project.

I clicked on Tools/Options/ directories, and added both the drawstuff
link and the ode link.
but when I execute my project I get the error:
"fatal error C1083: Cannot open include file: 'ode/ode': No such file
or directory
Error executing cl.exe.

Can anyone advise me on what to do or what Iam doing wrong
thanks...

Marc "Foddex" Oude Kotte

unread,
Sep 17, 2008, 4:03:24 AM9/17/08
to ode-...@googlegroups.com
Be sure to add the "include" directory in ODE to your project settings!
Because in that directory, the file ode/ode.h exists. Adding the main
ode-0.10.1 directory (or whatever version you use) is no good!

HTH!

Marc

Awish

unread,
Sep 17, 2008, 5:38:22 PM9/17/08
to ode-users
I have tried your method and managed to compile but now I get 70
errors.:
NB: This is the test_crash code that Iam trying to compile on MSVC++
6.0


error LNK2001: unresolved external symbol _dJointSetFixed
aaa.obj : error LNK2001: unresolved external symbol _dJointCreateFixed
aaa.obj : error LNK2001: unresolved external symbol
_dJointSetHinge2Param
aaa.obj : error LNK2001: unresolved external symbol
_dJointSetHinge2Axis2
aaa.obj : error LNK2001: unresolved external symbol
_dJointSetHinge2Axis1
aaa.obj : error LNK2001: unresolved external symbol
_dJointSetHinge2Anchor
aaa.obj : error LNK2001: unresolved external symbol _dBodyGetPosition
aaa.obj : error LNK2001: unresolved external symbol _dJointAttach
aaa.obj : error LNK2001: unresolved external symbol
_dJointCreateHinge2
aaa.obj : error LNK2001: unresolved external symbol _dCreateSphere
aaa.obj : error LNK2001: unresolved external symbol _dMassSetSphere
-------------------------------------------
where is it that I am going wrong.????
-----------------------------------------

On Sep 17, 8:03 pm, "Marc \"Foddex\" Oude Kotte" <m...@solcon.nl>
wrote:
> > thanks...- Hide quoted text -
>
> - Show quoted text -

Marc "Foddex" Oude Kotte

unread,
Sep 18, 2008, 2:40:12 AM9/18/08
to ode-...@googlegroups.com
Your next step would be to link against a static or dynamic version of
ODE. This involves adding the directory where your .lib file resides to
the include path for the linker (under Linker | General | Additional
Library Directories) and adding the .lib file as a dependency (under
Linker | Input | Additional Dependencies).

I assume you know how to compile a static (e.g. DebugSingleLib) version
of ODE, or a dynamic one (e.g. ReleaseDoubleDLL).

Good luck!

HTH

Marc

Awish

unread,
Sep 22, 2008, 3:55:40 PM9/22/08
to ode-users
I followed the steps you explained to me. now i get these 4 errors:

-------------------------------
--------------------Configuration: test - Win32
Debug--------------------
Linking...
test.obj : error LNK2001: unresolved external symbol _dsDrawSphereD
test.obj : error LNK2001: unresolved external symbol _dsSetColor
test.obj : error LNK2001: unresolved external symbol _dsSetViewpoint
test.obj : error LNK2001: unresolved external symbol _dsSimulationLoop
Debug/test.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
test.exe - 5 error(s), 0 warning(s)
-----------------------------------------------------------------------------
And this is the code that i am trying to simulate:
------------------------------------------------------------------

// Open Dynamics Engine
// ?????, ???? (2007) http://demura.net/

// 1.1: hello.cpp by Kosei Demura (2007-5-17)
#include <ode/ode.h> // ODE?????????
#include <drawstuff/drawstuff.h> // ???????????

dWorldID world; // ??????
dBodyID apple; // ???
dReal r = 0.2, m = 1.0; // ??????,??
dsFunctions fn; // ????????????

void simLoop(int pause) /*** ??????????? ***/
{
dWorldStep(world,0.01); // ?????????1???????

dsSetColor(1.0,0.0,0.0); // ?????(r,g,b)
const dReal *pos = dBodyGetPosition(apple); // ?????????
const dReal *R = dBodyGetRotation(apple); // ?????????
dsDrawSphereD(pos,R,r); // ??????
}

void start() /*** ??? ***/
{
static float xyz[3] = {3.0,0.0,1.0}; // ?????
static float hpr[3] = {-180, 0, 0}; // ?????
dsSetViewpoint(xyz,hpr); // ??????
}

void setDrawStuff() /*** ??????? ***/
{
fn.version = DS_VERSION; // ?????????????
fn.start = &start; // ??? start???????
fn.step = &simLoop; // simLoop???????
fn.path_to_textures = "../../drawstuff/textures"; // ?????
}

int main(int argc, char **argv) /*** main?? ***/
{
setDrawStuff(); // ???????
world = dWorldCreate(); // ?????
dWorldSetGravity(world,0,0,-0.2); // ????

apple = dBodyCreate(world); // ??????
dMass mass; // ???mass???
dMassSetZero(&mass); // ???mass????
dMassSetSphereTotal(&mass,m,r); // ???mass??????
dBodySetMass(apple,&mass); // ????mass???
dBodySetPosition(apple, 0.0, 0.0, 2.0); // ??????(x,y,z)???

dsSimulationLoop(argc,argv,640,480,&fn); // ???????????
dWorldDestroy(world); // ?????
return 0;
}
-----------------------------------------------------------------------------------
Any other suggestions on what i need to do next?????
Thanks.....


On Sep 18, 6:40 pm, "Marc \"Foddex\" Oude Kotte" <m...@solcon.nl>
> > > - Show quoted text -- Hide quoted text -

Marc "Foddex" Oude Kotte

unread,
Sep 23, 2008, 3:00:54 AM9/23/08
to ode-...@googlegroups.com
Hmm, you're probably missing the "drawstuff" code. I don't work with it
myself, but I believe there should be a drawstuffd.lib for debug (or a
drawstuff.lib for release) file that you should add as a dependency,
just as you added the DebugSingleLib (or similar) dependency I explained
before! If you cannot find such file, you might have to run the
"premake.bat" file in the build directory with different options, IIRC
it's "--with-demos", and re-open the generated solution file and
re-compile.

HTH!

Marc

demu

unread,
Sep 23, 2008, 10:38:58 AM9/23/08
to ode-users
Hello Awishi,

It seems that the code is my sample code.

The code was for below ODE0.9. Today, I changed my sample codes for
ODE0.10.1.

Please visit my web site and download robosimu080829.zip as follows.

http://demura.net/simulation

You can build them by Visual C++, Code:Blocks and make with premake
like the ODE demo programs.

Regards,

demu

On 9月23日, 午前4:55, Awish <awishkar.ku...@gmail.com> wrote:
> I followed the steps you explained to me. now i get these 4 errors:
>
> -------------------------------
> --------------------Configuration: test - Win32
> Debug--------------------
> Linking...
> test.obj : error LNK2001: unresolved external symbol _dsDrawSphereD
> test.obj : error LNK2001: unresolved external symbol _dsSetColor
> test.obj : error LNK2001: unresolved external symbol _dsSetViewpoint
> test.obj : error LNK2001: unresolved external symbol _dsSimulationLoop
> Debug/test.exe : fatal error LNK1120: 4 unresolved externals
> Error executing link.exe.
> test.exe - 5 error(s), 0 warning(s)
> --------------------------------------------------------------------------- --
> And this is the code that i am trying to simulate:
> ------------------------------------------------------------------
>
> // Open Dynamics Engine
> // ?????, ???? (2007)http://demura.net/

Awish

unread,
Sep 28, 2008, 11:38:07 PM9/28/08
to ode-users
Hi,
I compiled the above code using ODE0.10.1, but I still get a error in
the code saying
there is an error in the file objects.h.
And also how do I use premake to build using Visual 6 C++.
Do I have to add a line of code or is it something to add in the
settings.
Any suggestions...
thanks........

On Sep 24, 2:38 am, demu <Kosei.Dem...@gmail.com> wrote:
> Hello Awishi,
>
> It seems that the code is my sample code.
>
> The code was for below ODE0.9. Today, I changed my sample codes for
> ODE0.10.1.
>
> Please visit my web site and download robosimu080829.zip as follows.
>
> http://demura.net/simulation
>
> You can build them by Visual C++, Code:Blocks and make with premake
> like theODEdemo programs.
>
> Regards,
>
> demu
>
> On 9月23日, 午前4:55, Awish <awishkar.ku...@gmail.com> wrote:
>
>
>
> > I followed the steps you explained to me. now i get these 4 errors:
>
> > -------------------------------
> > --------------------Configuration: test - Win32
> > Debug--------------------
> > Linking...
> > test.obj : error LNK2001: unresolved external symbol _dsDrawSphereD
> > test.obj : error LNK2001: unresolved external symbol _dsSetColor
> > test.obj : error LNK2001: unresolved external symbol _dsSetViewpoint
> > test.obj : error LNK2001: unresolved external symbol _dsSimulationLoop
> > Debug/test.exe : fatal error LNK1120: 4 unresolved externals
> > Error executing link.exe.
> > test.exe - 5 error(s), 0 warning(s)
> > --------------------------------------------------------------------------- --
> > And this is the code that i am trying to simulate:
> > ------------------------------------------------------------------
>
> > // Open Dynamics Engine
> > // ?????, ???? (2007)http://demura.net/
>
> > // 1.1: hello.cpp by Kosei Demura (2007-5-17)
> > #include <ode/ode.h> //ODE?????????
> > #include <drawstuff/drawstuff.h> // ???????????- Hide quoted text -

demu

unread,
Sep 29, 2008, 7:41:32 PM9/29/08
to ode-users
Hello Awish,

I used the same premake file as ODE0.10.1 to build my sample programs,
robosimu080829.zip in http://demura.net/simulation.

INSTALL.txt in the ODE0.10.1 source code describes as follows,
"Note that Visual Studio 6 is not supported and users are advised to
upgrade to Visual C++ 2005 Express (it's free!)".

I do not have the Visual Studio 6, so I cannot try to build my codes
with it.

However, I can build my sample codes with Visual C++ 2008 Express
Edition.
How about upgrade ?

Regards,

demu

Awish

unread,
Sep 30, 2008, 7:06:48 PM9/30/08
to ode-users
hello,
I am now using microsoft visual 2005, I have added all the necessary
files by going to
Tools/options/ projects and solutions/ v c++ directories and added
both ode and drawstuff, but still i get a error saying

"Error1 fatal error C1083: Cannot open include file: 'ode/ode.h': No
such file or directory c:\Documents and Settings\Administrator\My
Documents\Visual Studio 2005\Projects\test 1\test 1\test.cpp"

could you tell me why it does not compile the project. It used to work
when i used visual 6 but now it is not able to include the files.
thanks..

On Sep 30, 11:41 am, demu <Kosei.Dem...@gmail.com> wrote:
> Hello Awish,
>
> I used the same premake file as ODE0.10.1 to build my sample programs,
> robosimu080829.zip inhttp://demura.net/simulation.
>
> INSTALL.txt in the ODE0.10.1 source code describes as follows,
> "Note that Visual Studio 6 is not supported and users are advised to
> upgrade to Visual C++ 2005 Express (it's free!)".
>
> I do not have the Visual Studio 6, so I cannot try to build my codes
> with it.
>
> However, I can build my sample codes with Visual C++ 2008 Express
> Edition.
> How about upgrade ?
>
> Regards,
>
> demu
>
> On 9月29日, 午後12:38, Awish <awishkar.ku...@gmail.com> wrote:
>
>
>
> > Hi,
> > I compiled the above code using ODE0.10.1, but I still get a error in
> > the code saying
> > there is an error in the file objects.h.
> > And also how do I use premake to build using Visual 6 C++.
> > Do I have to add a line of code or is it something to add in the
> > settings.
> > Any suggestions...
> > thanks........- Hide quoted text -

demu

unread,
Sep 30, 2008, 11:07:07 PM9/30/08
to ode-users
Hi,

I tried to build the my sample programs, robosimu080829.zip with
Visual C++ 2008 Express Edition again.
There is no problem to build, and there is simple instruction to build
the programs in http://demura.net/simulation.

Did you build my sample programs with roboSimu.sln created by my
premake.lua script,
or build your program, test1.cpp, with the roboSimu.sln ?

The roboSimu.sln is only for my sample programs.

I think your error message seems that you did not add ODE's include
directory to your project file.

Regards,

demu

Awish

unread,
Oct 1, 2008, 7:40:56 PM10/1/08
to ode-users
hello,
i explain what I am doing and maybe you can tell me what the problem
is.
1) I open microsoft visual 2005.
2) open new project\select other languages\visual c++\windows32
console application

3) a welcome to win32 application wizards comes.
4) in the application settings : the application type is "console
application"
additional options" empty project" then click finish.
5) open Project\add new item\code\c++ file.cpp.
6) I copy and paste the codes for the one shown in one of my previous
posting.
7) open tools\options\projects and solutions\VC++ directories.
8) I add the directories:

C:\ode-0.10.1\include
C:\ode-0.10.1\include\drawstuff
C:\ode-0.10.1\include\ode
9) i open\project\project properties\confriguration properties\linker
\input\additional dependencies: and add the following lib files:
winmm.lib d3d9.lib d3dx9.lib user32.lib Gdi32.lib advapi32.lib
user32.lib gdi32.lib ode.lib...
10) then i compile :build\compile.
Regardless of the situation that I wont get to view the simulation,
what else needs to be added to the project properties to get no errors
and atleast add the ode.h file and drawstuff.h file to he project..
thanks.......


On Oct 1, 3:07 pm, demu <Kosei.Dem...@gmail.com> wrote:
> Hi,
>
> I tried to build the my sample programs, robosimu080829.zip with
> Visual C++ 2008 Express Edition again.
> There is no problem to build, and there is simple instruction to build
> the programs inhttp://demura.net/simulation.
>
> Did you build my sample programs with roboSimu.sln created by my
> premake.lua script,
> or build your program, test1.cpp, with the roboSimu.sln ?
>
> The roboSimu.sln is only for my sample programs.
>
> I think your error message seems that you did not add ODE's include
> directory to your project file.
>
> Regards,
>
> demu
>
> On 10月1日, 午前8:06, Awish <awishkar.ku...@gmail.com> wrote:
>
>
>
> > hello,
> > I am now using microsoft visual 2005, I have added all the necessary
> > files by going to
> > Tools/options/ projects and solutions/ v c++ directories and added
> > both ode and drawstuff, but still i get a error saying
>
> > "Error1 fatal error C1083: Cannot open include file: 'ode/ode.h': No
> > such file or directory c:\Documents and Settings\Administrator\My
> > Documents\Visual Studio 2005\Projects\test 1\test 1\test.cpp"
>
> > could you tell me why it does not compile the project. It used to work
> > when i used visual 6 but now it is not able to include the files.
> > thanks..- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages