Skip to content

Commit

Permalink
Add go modules, link against libc++ instead of stdc++
Browse files Browse the repository at this point in the history
  • Loading branch information
Arman92 committed Jun 4, 2021
1 parent 430aa56 commit dd0fd93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/Arman92/go-tdlib

go 1.15
10 changes: 5 additions & 5 deletions tdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package tdlib
//#cgo linux CFLAGS: -I/usr/local/include
//#cgo darwin CFLAGS: -I/usr/local/include
//#cgo windows CFLAGS: -IC:/src/td -IC:/src/td/build
//#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lc++ -lssl -lcrypto -ldl -lz -lm

This comment has been minimized.

Copy link
@Zoha

Zoha Aug 22, 2022

@Arman92
breaking change without updating the tag version

//#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lc++ -lssl -lcrypto -ldl -lz -lm
//#cgo windows LDFLAGS: -LC:/src/td/build/Debug -ltdjson
//#include <stdlib.h>
//#include <td/telegram/td_json_client.h>
Expand Down Expand Up @@ -214,8 +214,8 @@ func SetFilePath(path string) {
bytes, _ := json.Marshal(UpdateData{
"@type": "setLogStream",
"log_stream": UpdateData{
"@type": "logStreamFile",
"path": path,
"@type": "logStreamFile",
"path": path,
"max_file_size": 10485760,
},
})
Expand All @@ -229,7 +229,7 @@ func SetFilePath(path string) {
// By default the TDLib uses a verbosity level of 5 for logging.
func SetLogVerbosityLevel(level int) {
bytes, _ := json.Marshal(UpdateData{
"@type": "setLogVerbosityLevel",
"@type": "setLogVerbosityLevel",
"new_verbosity_level": level,
})

Expand Down

0 comments on commit dd0fd93

Please sign in to comment.