[Help-gnutls] Compiling and linking problems

zero_effect at mail.bg zero_effect at mail.bg
Thu Dec 29 21:56:18 CET 2005


So I have written my first application with GnuTLS, but when
I decided to compile it, there appears some errors that I
can't correct. The application is closely based on the SRP
client example and is written in C++.

When I use the GnuTLS 1.3.x branch the compiler gives me the
following error:
> # g++ -o client client.cxx
> In file included from common.h:4
>                  from client.cxx:32
> /usr/include/gnutls/extra.h:95: error: expected `,' or
`...' before "new"
It doesn't appear when I make my application C compatible
and compile it with gcc C compiler. Maybe the cause of the
error is that in C++ there is a operator named "new", but
in the header file "new" is used as a pointer.

The second error appears while the linking (no matter which
version I use - 1.2.x or 1.3.x):
> # gcc -o client client.cxx `libgnutls-config --libs
--cflags`
> /tmp/ccWTsMl2.o(.text+0x12f): In function `main':
> : undefined reference to `gnutls_global_init_extra'
> collect2: ld return 1 exit status

My compiler is GCC 3.4.3 and the linker is Binutils 2.15.90.
The distribution is made from scratch by me.

Any ideas or suggestions on how I can fix these errors?

-----------------------------

Íÿêîè DVD â ÑËÎÍ.ÁÃ:
· Star Wars Åïèçîä III: Îòìúùåíèåòî íà Ñèòèòå
· Íåáåñíî öàðñòâî
· Ïîëÿðåí Åêñïðåñ
http://www.slon.bg






More information about the Gnutls-help mailing list