Comments (9)
@Nhoya okay, thanks, seems like I found the problem. It comes with tdlib update v1.1. Trying to fix it now.
from go-tdjson.
@Nhoya seems like my presets for cgo
don't work with your configuration. Can you show go env
output?
Also you can try to add this line:
//#cgo CFLAGS: -I/usr/local/include
To get it:
package tdjson
//#cgo CFLAGS: -I/usr/local/include
//#cgo LDFLAGS: -ltdjson
//#include <stdlib.h>
If it help you, I will push fix.
from go-tdjson.
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/zeta/.go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build452554512=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
Adding //#cgo CFLAGS: -I/usr/local/include
and rebuilding still:
In file included from ./tdjson.go:7:0:
/usr/local/include/td/telegram/td_log.h:61:1: error: unknown type name 'using'; did you mean 'uint'?
using td_log_fatal_error_callback_ptr = void (*)(const char *error_message);
^~~~~
uint
/usr/local/include/td/telegram/td_log.h:61:41: error: expected expression before 'void'
using td_log_fatal_error_callback_ptr = void (*)(const char *error_message);
^~~~
/usr/local/include/td/telegram/td_log.h:72:52: error: expected declaration specifiers or '...' before 'td_log_fatal_error_callback_ptr'
TDJSON_EXPORT void td_set_log_fatal_error_callback(td_log_fatal_error_callback_ptr callback);
from go-tdjson.
@Nhoya does this directory even exists? /usr/local/include/td
Maybe you use some special distr. You should set here path to code.
from go-tdjson.
pwd
/usr/local/include/td
ls -lah
drwxr-xr-x 4 root root 4,0K 2 feb 12.24 .
drwxr-xr-x 3 root root 4,0K 2 feb 12.24 ..
drwxr-xr-x 2 root root 4,0K 2 feb 12.24 telegram
drwxr-xr-x 2 root root 4,0K 2 feb 12.24 tl
I'm on archlinux
from go-tdjson.
It's TDLib problem. I opened issue (tdlib/td#29), hope they will fix it soon.
from go-tdjson.
Well i tried with the newer version of tdlib but still
github.com/L11R/go-tdjson
# github.com/L11R/go-tdjson
In file included from ../../../.go/src/github.com/L11R/go-tdjson/tdjson.go:6:0:
./td/telegram/td_log.h:61:1: error: unknown type name 'using'; did you mean 'uint'?
using td_log_fatal_error_callback_ptr = void (*)(const char *error_message);
^~~~~
uint
./td/telegram/td_log.h:61:41: error: expected expression before 'void'
using td_log_fatal_error_callback_ptr = void (*)(const char *error_message);
^~~~
./td/telegram/td_log.h:72:52: error: expected declaration specifiers or '...' before 'td_log_fatal_error_callback_ptr'
TDJSON_EXPORT void td_set_log_fatal_error_callback(td_log_fatal_error_callback_ptr callback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from go-tdjson.
@Nhoya as you can see here: https://github.com/tdlib/td/blob/master/td/telegram/td_log.h#L61
There is no any keyword using
. You just didn't update tdlib
.
from go-tdjson.
I test it myself. All working as should. So I close it.
from go-tdjson.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-tdjson.