Linking error on Stg::BlockGroup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Linking error on Stg::BlockGroup

Sterling McLeod
Hi,

I am receiving a linking error when trying to compile some basic source. I am trying to create a Stg::Model object with the following:

#include <Stage-4.1/stage.hh>

int main(int argc, char** argv) {
  Stg::Model model;
}

I compile with "g++ stage_test.cpp -lstage". It returns the following error:

/tmp/ccFQf9jQ.o: In function `Stg::Model::Model()':
stage_test.cpp:(.text._ZN3Stg5ModelC2Ev[_ZN3Stg5ModelC5Ev]+0x5a): undefined reference to `Stg::BlockGroup::BlockGroup()'
collect2: error: ld returned 1 exit status

When I install Stage, it installs /usr/local/lib64/libstage.so.4.1.1 and /usr/local/lib64/libstage.so. Neither of these work.

Can anyone tell me what I am missing here?

Sterling

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|

Re: Linking error on Stg::BlockGroup

Sterling McLeod
This issue was fixed by compiling with cmake.

cmake_minimum_required(VERSION 2.6)

find_library(LIB_STAGE stage PATHS /usr/local/lib)
include_directories(/usr/local/include/Stage-4.1/)
add_executable(stage_test stage_test.cpp)
target_link_libraries(stage_test ${LIB_STAGE})



------------------------------------------------------------------------------

_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|

Re: Linking error on Stg::BlockGroup

Rich Mattes-2
On 03/28/2014 10:09 AM, Sterling McLeod wrote:

> This issue was fixed by compiling with cmake.
>
> cmake_minimum_required(VERSION 2.6)
>
> find_library(LIB_STAGE stage PATHS /usr/local/lib)
> include_directories(/usr/local/include/Stage-4.1/)
> add_executable(stage_test stage_test.cpp)
> target_link_libraries(stage_test ${LIB_STAGE})
>
>
You were probably missing an -L/usr/local/lib in the original email.

Rich


------------------------------------------------------------------------------
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers