Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pidgin use? #1

Open
HaoZeke opened this issue Jun 25, 2015 · 6 comments
Open

Pidgin use? #1

HaoZeke opened this issue Jun 25, 2015 · 6 comments

Comments

@HaoZeke
Copy link

HaoZeke commented Jun 25, 2015

Is there any implementation of this to be used with pidgin?
cmake .
make
produces a snapchat file.
make install has no target...

@bdkoepke
Copy link
Owner

bdkoepke commented Jul 6, 2015

Unfortunately not yet. The libpurple API ended up being much more obtuse than I expected.

@rodneyrod
Copy link

I can't get this to compile at all actually.

@bdkoepke
Copy link
Owner

KELBDKOEPB002:libpurple-snapchat bkoepke$ cmake CMakeLists.txt && make
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/bkoepke/src/libpurple-snapchat
[100%] Built target snapchat
KELBDKOEPB002:libpurple-snapchat bkoepke$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix
KELBDKOEPB002:libpurple-snapchat bkoepke$

Works for me on FreeBSD/Linux as well. Not sure about windows.

@rodneyrod
Copy link

I keep getting the following, trying to compile on Ubuntu 15.04

Linking C executable snapchat
CMakeFiles/snapchat.dir/snapchat_sha256.c.o: In function snapchat_sha256': snapchat_sha256.c:(.text+0x22): undefined reference toSHA256_Init'
snapchat_sha256.c:(.text+0x44): undefined reference to SHA256_Update' snapchat_sha256.c:(.text+0x65): undefined reference toSHA256_Final'
CMakeFiles/snapchat.dir/snapchat_util.c.o: In function int_to_str': snapchat_util.c:(.text+0xa3): undefined reference toceil'
collect2: error: ld returned 1 exit status

@NeoBelerophon
Copy link

Following patch should fix the build issue:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7a2242..239f037 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,17 @@
 cmake_minimum_required(VERSION 2.8)

-set(MATH_LINK_FLAGS
-    "-lm")
-set(SSL_LINK_FLAGS
-    "-lssl -lcrypto")
-set(CMAKE_EXE_LINKER_FLAGS
-    "${CMAKE_EXE_LINKER_FLAGS} ${SSL_LINK_FLAGS} ${MATH_LINK_FLAGS}")
+FIND_PACKAGE(OpenSSL REQUIRED)
+
+include_directories(OPENSSL_INCLUDE_DIR)
+link_directories( ${OPENSSL_LIBRARIES})
+
+add_definitions()

 set(snapchat_SRCS
     snapchat.c
     snapchat_sha256.c
     snapchat_util.c)

-add_executable(snapchat ${snapchat_SRCS})
+add_executable(snapchat ${snapchat_SRCS}) 

-target_link_libraries(snapchat)
+target_link_libraries(snapchat m crypto)

@bdkoepke
Copy link
Owner

Added your cmake patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants