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 8310725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:33:58+00:00 2026-06-08T19:33:58+00:00

I am trying to compile my project with a library called SDL_draw using cmake

  • 0

I am trying to compile my project with a library called SDL_draw using cmake .
After i download and install it the library files goes to /usr/local/lib and is named libSDL_draw.a ,so i edited the CMakeLists.txt to read this .

link_directories(
    /usr/local/lib
)
include_directories(/usr/local/lib)

ADD_EXECUTABLE(point_trajectory point_trajectory.cpp)

TARGET_LINK_LIBRARIES(point_trajectory SDL_draw)

The cmake succeeds but when i “make” the project after cmake it still cannot find SDL_draw.h .

fatal error: SDL_draw.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/point_trajectory.dir/point_trajectory.cpp.o] Error 1
make[1]: *** [CMakeFiles/point_trajectory.dir/all] Error 2
make: *** [all] Error 2
  • 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-06-08T19:34:00+00:00Added an answer on June 8, 2026 at 7:34 pm

    I have never used SDL_draw before, but something looks funny. Usually the library archive is in /usr/local/lib but the header file is somewhere else … probably /usr/local/include .

    You might want to double-check where SDL_draw.h is. If it is in /usr/local/lib, then double-check that you installed it correctly.

    Possibly, this will fix your problem:

    include_directories(/usr/local/include)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile a project using the ASIHTTPREQUEST library. I followed the
I am trying to compile c++ project on Redhat Linux 4.1.2 machine using Cmake
I am trying to compile my project on Snow Leopard using the same CMakeLists.txt
Using Qt Creator 2.4.1 (Windows/mingw), I'm trying to compile my project dynamically linking with
Im trying to compile a simple class library project,its from Source Safe. However,when i
I'm trying to compile a project using appcelerator (crossplatform dev for iphone/android). Just evaluating
I'm trying to compile a project which is using OpenAL on Mac OS X
I am trying to compile a Qt project that uses poppler library for pdf
I am trying to compile a vc++ project as 64 bit using visual c++
I'm trying to compile a set of .c files from an open source project

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.