|
-
September 29th, 2010, 10:49 AM
#5
Re: Boost.Extension Tutorial 1 - Problem
So I just understood that the linker is complaining about not finding the necessary library. I know that -ldl would be the parameter to pass to the compiler. Unfortunately I do not know how to accomplish this in BJam. I think that I'll have a look at the BJam-documentation.
Anyway I also tried to compile the program by hand. That's what I did:
1. create dynamic library:
Code:
sudo g++ -shared -fPIC hello_world.cpp -o libhello.so
2. compile the main program:
Code:
sudo g++ -o hello main.cpp -ldl
And then I let it run. Unfortunately loading the dynamic library failed as the program printed "Library failed to open: libhello.so" - that's the string which the main function should print in this case.
Does anybody have a hint whether it could be because of a misconstruction in the source code or rather be caused by a missing compilation parameter, for instance?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|