I’m trying to install a library that I can use to access Amazon’s S3 service (I just need to be able to upload files there). The code needs to be in C++ because it’s going to be bundled as part of an application I’m working on.
I’m trying to work with Bryan Ischo’s library located here: http://libs3.ischo.com.s3.amazonaws.com/index.html
I’m having some installation issues though. I changed GNUMakefile.macosx to GNUMakefile and then ran “sudo make install”, as I’m developing on a Mac. Then I made a test .cpp file.
#include <libs3.h>
...a few other things...
int main() {
cout << "Hello World!" << endl;
S3_initialize(NULL, S3_INIT_ALL);
return 0;
}
All I want to do is to be able to initialize the library, since this is what his API says to do. However, I get back this error:
Undefined symbols:
"_S3_initialize", referenced from:
_main in ccRcG0yS.o
ld: symbol(s) not found
I’d like some help either fixing my installation of libs3 or getting a few tips on accessing S3 through C++.
Thanks!
Your test application is not linking with
libs3. You will need to add it to the linker flags, such as-ls3(if the library is libs3.so/a)