Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6229075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:30:03+00:00 2026-05-24T09:30:03+00:00

I’m working on some code that uses Open Dynamics Engine . I’ve worked with

  • 0

I’m working on some code that uses Open Dynamics Engine. I’ve worked with this code before on windows, but now I’m moving over to unix so I can get experience working with C under a unix environment and so I’m not reliant on visual studio. I downloaded everything to my home directory, built using the included makefile and tried a demo; everything’s good. I made a directory and a test file in it with my own test. For my #include I specified:

#include ".././ode-0.11.1/include/ode/ode.h"
#include ".././ode-0.11.1/include/drawstuff/drawstuff.h"

Since the library is just located in my home directory and not in the standard location. I go to compile my code but:

.././ode-0.11.1/include/ode/ode.h:28:27: fatal error: ode/odeconfig.h: No such 
file or directory

Looking at ode.h, it includes a bunch of other headers all located in the same directory, but using the bracket syntax instead of quotes. I’m guessing this has something to do with why gcc can’t locate the other headers. I’ve looked at the makefiles but don’t know enough to figure out what my issue is. Why is my compilation not working? A detailed/thorough answer would be appreciated since I want to learn how this all works (linking, includes, make, etc.).

Edit: So I figured out how to include the headers correctly, now I need to figure out how to link to the library definitions for the functions…

Edit2: Still can’t figure out how to link to my code. The compiled static libraries get dumped in ‘~/ode-0.11.1/ode/src/.libs’ and ‘~/ode-0.11.1/drawstuff/src/.libs’ for the drawing functions.

Edit3: I think I figured it out. I wasn’t using the -l option correctly, and it seems like it has to go AFTER the files that reference functions from the libraries I’m linking to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:30:04+00:00Added an answer on May 24, 2026 at 9:30 am

    You need to set the include directory in the compile line

    e.g.

    gcc -I.././ode-0.11.1/include
    

    or better in this cas an absolute path

    Then in code include like

    #include "ode/ode.h"
    #include "drawstuff/drawstuff.h"
    

    Thus all the files included from ode.h will be accessed from the same directory. Your example ode/odeconfig.h would be found as ode is a subdirectoy from the include path in the -I parameter.

    Linking is similar but both parts done on the command line .The two parts are file given by a -l variable and the directory the lib is in by -L parameter. Also if the library is say libode.dylib the you just meed the name e.g. ode.

    So command line is

    gcc -lode -L.././ode-0.11.1/lib
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.