[ntl] NTL_CLIENT / namespace

Friedrich Wiemer friedrichwiemer at gmail.com
Fri Feb 6 04:34:11 CST 2015


Hi,

Do you have a
> using namespace NTL;
in your c++ code?

I think NTL_CLIENT is the deprecated version for "using namespace NTL",
so perhaps you can try this?

Best,
Friedrich

On 02/05/2015 05:51 PM, campagne wrote:
> Hello
> 
> I would like to use "NTL/xdouble.h" on Mac Os X
> The compilation/tests of NTL goes fine.
> But in my simple program I have same troubles.
> 
> either  I have
> 
> g++ -o ex_jec.exe ex_jec.cpp -I./include/  ./src/ntl.a -lm
> Undefined symbols for architecture x86_64:
>   "(anonymous namespace)::to_xdouble(double)", referenced from:
>       _main in ccctuItC.o
>   "(anonymous namespace)::operator<<(std::basic_ostream<char,
> std::char_traits<char> >&, (anonymous namespace)::xdouble const&)",
> referenced from:
>       _main in ccctuItC.o
>   "(anonymous namespace)::operator*((anonymous namespace)::xdouble
> const&, (anonymous namespace)::xdouble const&)", referenced from:
>       _main in ccctuItC.o
>   "(anonymous namespace)::operator-((anonymous namespace)::xdouble
> const&)", referenced from:
>       _main in ccctuItC.o
> ld: symbol(s) not found for architecture x86_64
> 
> Or if I add NTL_CLIENT after the #include "NTL/xdouble.h" I get
> 
> g++ -o ex_jec.exe ex_jec.cpp -I./include/  -L./src -lntl -lm
> In file included from ./include/NTL/ZZ.h:19:0,
>                  from ./include/NTL/xdouble.h:4,
>                  from ex_jec.cpp:20:
> ./include/NTL/tools.h:31:50: error: expected identifier before ';' token
>  #define NTL_USE_NNS using namespace NTL_NAMESPACE;
>                                                   ^
> ./include/NTL/tools.h:66:32: note: in expansion of macro 'NTL_USE_NNS'
>  #define NTL_CLIENT NTL_USE_SNS NTL_USE_NNS
>                                 ^
> ex_jec.cpp:21:1: note: in expansion of macro 'NTL_CLIENT'
>  NTL_CLIENT
> 
> 
> Some help needed.
> Thanks
> JE
> 
> _______________________________________________
> ntl mailing list
> ntl at shoup.net
> http://shoup.net/mailman/listinfo/ntl_shoup.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://shoup.net/pipermail/ntl_shoup.net/attachments/20150206/8238b7f2/attachment.asc>


More information about the ntl mailing list