Hi,

I'm a total beginner to the Boost library and wanted to use Boost.Extension to build a plugin-based program.
After struggling through the installation of various Boost-stuff I wanted to give tutorial_1 a try:
http://boost-extension.redshoelace.c...als.tutorial01

So I created following files:
shared_test/
..|
..+- Jamroot
..+- tutorial_1/
.........|
.........+- hello_world.cpp
.........+- main.cpp

Jamroot looks like this:
####################################
import type : change-generated-target-suffix ;
import type : change-generated-target-prefix ;
type.change-generated-target-suffix SHARED_LIB : : extension ;
type.change-generated-target-prefix SHARED_LIB : : lib ;

import os ;

local BOOST_ROOT = [ os.environ /usr/local/include/boost ] ;
project
: requirements
<include>#(BOOST_ROOT)
:
;

lib tutorial_1 : tutorial_1/hello_world.cpp : <link>shared ;
exe tutorial_1_bin : tutorial_1/main.cpp ;

install binaries :
tutorial_1 tutorial_1_bin
;
####################################

hello.cpp looks like this:
####################################
#include <iostream>
#include <boost/extension/extension.hpp>

extern "C"

void BOOST_EXTENSION_EXPORT_DECL
boost_extension_hello_world (int repetitions)
{
for (int i = 0; i < repetitions; i++) {
std::cout << "Hello, World!" << std::endl;
}
}
####################################

And main.cpp looks like this:
####################################
#include <iostream>
#include <boost/extension/shared_library.hpp>
#include <boost/function.hpp>

class shared_library;

int main()
{
std::string library_path = "libtutorial_1.extension";
shared_library lib(library_path);
if (!lib.open()) {
std::cerr << "Library failed to open: " << library_path << std << endl;
return 1;
}

boost::function<void (int)>
f(lib.get<void, int>("boost_extension_hello_world"));

if (!f) {
std::cerr << "Function not found!" << std::endl;
return 1;
}

f(4);
}
####################################


Now the problem: When I'm in the "shared_test"-folder and try to compile the files by typing
bjam

I obtain the following error messages:

gcc.compile.c++ bin/gcc-4.4.3/debug/tutorial_1/main.o
tutorial_1/main.cpp: In function ‘int main()’:
tutorial_1/main.cpp:10: error: variable ‘shared_library lib’ has initializer but incomplete type
tutorial_1/main.cpp:12: error: expected primary-expression before ‘<<’ token
tutorial_1/main.cpp:12: error: ‘endl’ was not declared in this scope
tutorial_1/main.cpp:17: error: expected primary-expression before ‘void’
tutorial_1/main.cpp:17: error: expected primary-expression before ‘int’

Does anybody see the problem here? I'm sure it's just some kind of newbie problem.