google-code-export / twitcurl

Automatically exported from code.google.com/p/twitcurl
1 stars 1 forks source link

g++ compile issue #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download source using svn
2. Use "make" command to build "libtwitcurl.so.1.0" (get error messages shown 
below, but finishes build anyway)
3. Place "oauthlib.h" & "twitcurl.h" in /usr/local/include and place 
"libtwitcurl.so.1.0" in /usr/local/lib.
4. Attempt to compile attached, simple program using g++ and get error messages 
below. (all program tries to do is instantiate twitCurl object)

What is the expected output? What do you see instead?

Expected output of "make" command is clean make. Get following error messages:

g++ -Wall -fPIC -c -I/usr/include twitcurl.cpp oauthlib.cpp urlencode.cpp 
base64.cpp HMAC_SHA1.cpp SHA1.cpp
In file included from oauthlib.cpp:2:0:
HMAC_SHA1.h: In constructor ‘CHMAC_SHA1::CHMAC_SHA1()’:
HMAC_SHA1.h:23:10: warning: ‘CHMAC_SHA1::AppendBuf2’ will be initialized 
after [-Wreorder]
HMAC_SHA1.h:21:10: warning:   ‘char* CHMAC_SHA1::SHA1_Key’ [-Wreorder]
HMAC_SHA1.h:34:3: warning:   when initialized here [-Wreorder]
In file included from HMAC_SHA1.cpp:8:0:
HMAC_SHA1.h: In constructor ‘CHMAC_SHA1::CHMAC_SHA1()’:
HMAC_SHA1.h:23:10: warning: ‘CHMAC_SHA1::AppendBuf2’ will be initialized 
after [-Wreorder]
HMAC_SHA1.h:21:10: warning:   ‘char* CHMAC_SHA1::SHA1_Key’ [-Wreorder]
HMAC_SHA1.h:34:3: warning:   when initialized here [-Wreorder]
HMAC_SHA1.cpp: In member function ‘void CHMAC_SHA1::HMAC_SHA1(BYTE*, int, 
BYTE*, int, BYTE*)’:
HMAC_SHA1.cpp:32:31: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
HMAC_SHA1.cpp:49:31: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
g++ -shared -Wl,-soname,libtwitcurl.so.1 -Wl,-rpath-link=/usr/lib -L/usr/lib 
-lcurl -o libtwitcurl.so.1.0 *.o

Expected output when compiling attached program using g++ is a clean compile. 
Get following error messages:

/tmp/cc16seU4.o: In function `main':
twitter_test.cpp:(.text+0x17): undefined reference to `twitCurl::twitCurl()'
twitter_test.cpp:(.text+0x47): undefined reference to `twitCurl::~twitCurl()'
twitter_test.cpp:(.text+0x65): undefined reference to `twitCurl::~twitCurl()'
collect2: ld returned 1 exit status

What version of the product are you using? On what operating system?

Using latest version of twitcurl from svn. Operating system-Arch Linux

Please provide any additional information below.

Original issue reported on code.google.com by adam.bev...@gmail.com on 17 Jun 2011 at 1:40

Attachments:

GoogleCodeExporter commented 9 years ago
Hi!
You need to link twitcurl library with your application (-ltwitcurl option). I 
have updated UNIX/Linux section in wiki page to have this info:
http://code.google.com/p/twitcurl/wiki/WikiHowToUseTwitcurlLibrary

Thanks.

Original comment by swatkat....@gmail.com on 17 Jun 2011 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by swatkat....@gmail.com on 19 Oct 2011 at 2:10