• Create Account

### #ActualAniMerrill

Posted 04 March 2013 - 09:39 PM

EDIT: So eventually figured out the problem, posted the answer down below.

So over the last week I've been pulling my hair out trying to figure out Ubuntu and how to compile using a terminal instead of an IDE and even somewhat taught myself how to use CMake so hopefully my game can be multiplatform. I successfully made and ran my first CMake file, but then when I went to "make" the file it created, it wouldn't compile.

The error it threw me was basically "allegro5/allegro.h" doesn't exist as a directory when it gets to my first cpp file. I'm sure this is either A) some error I made in the CMakeLists.txt file or B) some fundamental misunderstanding I have about Linux... or something. So sorry if this is a repost, I just don't have enough knowledge about either of these things to know what to search for on Google.

CMakeLists.txt:

cmake_minimum_required(VERSION 2.6)
project(game)
set(CMAKE_VERBOSE_MAKEFILE on)

#The version number
set(game_VERSION_MAJOR 0)
set(game_VERSION_MINOR 1)

set(game_SRCS SpriteSheet.cpp AnimationSet.cpp Map.cpp Character.cpp Main.cpp)

add_executable(game ${game_SRCS}) #Include Allegro include_directories(/home/username/Documents/allegro-5.0.9/build/include) #=============== link_directories(/home/username/Documents/allegro-5.0.9/build/lib) #=============== target_link_libraries(game liballegro.so)  The line that the error refers to is SpriteSheet.cpp where I've put #include <allegro5/allegro.h>. I almost forgot to mention that this is the first time I've compiled an external library, like Allegro, from source... so I may have screwed something up there. I've never seen a .so file in my life, but I'm going to just assume its a Linux thing. Also, if it matters at all, I'm on Ubuntu 12.10 and using Allegro 5.0.9. Thanks in advanced for any help. ### #2AniMerrill Posted 04 March 2013 - 09:39 PM EDIT: So eventually figured out the problem, posted the answer down below. So over the last week I've been pulling my hair out trying to figure out Ubuntu and how to compile using a terminal instead of an IDE and even somewhat taught myself how to use CMake so hopefully my game can be multiplatform. I successfully made and ran my first CMake file, but then when I went to "make" the file it created, it wouldn't compile. The error it threw me was basically "allegro5/allegro.h" doesn't exist as a directory when it gets to my first cpp file. I'm sure this is either A) some error I made in the CMakeLists.txt file or B) some fundamental misunderstanding I have about Linux... or something. So sorry if this is a repost, I just don't have enough knowledge about either of these things to know what to search for on Google. CMakeLists.txt: cmake_minimum_required(VERSION 2.6) project(game) set(CMAKE_VERBOSE_MAKEFILE on) #The version number set(game_VERSION_MAJOR 0) set(game_VERSION_MINOR 1) set(game_SRCS SpriteSheet.cpp AnimationSet.cpp Map.cpp Character.cpp Main.cpp) #Add the executable add_executable(game${game_SRCS})

#Include Allegro
#===============
#===============


The line that the error refers to is SpriteSheet.cpp where I've put #include <allegro5/allegro.h>.

I almost forgot to mention that this is the first time I've compiled an external library, like Allegro, from source... so I may have screwed something up there. I've never seen a .so file in my life, but I'm going to just assume its a Linux thing.

Also, if it matters at all, I'm on Ubuntu 12.10 and using Allegro 5.0.9.

Thanks in advanced for any help.

### #1AniMerrill

Posted 03 March 2013 - 01:46 PM

So over the last week I've been pulling my hair out trying to figure out Ubuntu and how to compile using a terminal instead of an IDE and even somewhat taught myself how to use CMake so hopefully my game can be multiplatform. I successfully made and ran my first CMake file, but then when I went to "make" the file it created, it wouldn't compile.

The error it threw me was basically "allegro5/allegro.h" doesn't exist as a directory when it gets to my first cpp file. I'm sure this is either A) some error I made in the CMakeLists.txt file or B) some fundamental misunderstanding I have about Linux... or something. So sorry if this is a repost, I just don't have enough knowledge about either of these things to know what to search for on Google.

CMakeLists.txt:

cmake_minimum_required(VERSION 2.6)
project(game)
set(CMAKE_VERBOSE_MAKEFILE on)

#The version number
set(game_VERSION_MAJOR 0)
set(game_VERSION_MINOR 1)

set(game_SRCS SpriteSheet.cpp AnimationSet.cpp Map.cpp Character.cpp Main.cpp)

#Include Allegro
#===============
#===============


The line that the error refers to is SpriteSheet.cpp where I've put #include <allegro5/allegro.h>.

I almost forgot to mention that this is the first time I've compiled an external library, like Allegro, from source... so I may have screwed something up there. I've never seen a .so file in my life, but I'm going to just assume its a Linux thing.

Also, if it matters at all, I'm on Ubuntu 12.10 and using Allegro 5.0.9.

Thanks in advanced for any help.

PARTNERS