468,512 Members | 1,088 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

problem compiling WinNTL on Windows system.

// big_integer.cpp
#include <NTL/ZZ.h>
//NTL_CLIENT
int main()
{
ZZ a;//, b, c;
// cin >a;
// cin >b;
// c = (a+1)*(b+1);
// cout << c << "\n";
return 0;
}
// end of source. download form www.shoup.net
// Compiler: Dev-c++ 4.9.9.2
Compiler: Default compiler
Executing g++.exe...
g++.exe "D:\CPP\WinNTL-5_4\tests\BerlekampTest.cpp" -o
"D:\CPP\WinNTL-5_4\tests\BerlekampTest.exe"
-I"D:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include"
-I"D:\Dev-Cpp\include\c++\3.4.2\backward"
-I"D:\Dev-Cpp\include\c++\3.4.2\mingw32"
-I"D:\Dev-Cpp\include\c++\3.4.2" -I"D:\Dev-Cpp\include"
-I"D:\CPP\WinNTL-5_4\include" -L"D:\Dev-Cpp\lib"
-L"D:\CPP\Numerical_Recipes\recipies" -L"D:\CPP\WinNTL-5_4"
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x3c0):BerlekampTest.cpp:
undefined reference to `NTL::operator>>(std::istream&, NTL::ZZ&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x3cb):BerlekampTest.cpp:
undefined reference to `NTL::ZZ_p::init(NTL::ZZ const&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x3f3):BerlekampTest.cpp:
undefined reference to `NTL::operator>>(std::istream&, NTL::ZZ_pX&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x42a):BerlekampTest.cpp:
undefined reference to `NTL::berlekamp(NTL::vec_pair_ZZ_pX_long&,
NTL::ZZ_pX const&, long)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x48f):BerlekampTest.cpp:
undefined reference to `NTL::mul(NTL::ZZ_pX&, NTL::vec_pair_ZZ_pX_long
const&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x4b1):BerlekampTest.cpp:
undefined reference to `NTL::Error(char const*)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x5c3):BerlekampTest.cpp:
undefined reference to `NTL::operator<<(std::ostream&,
NTL::vec_pair_ZZ_pX_long const&)'

C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x5fd):BerlekampTest.cpp:
undefined reference to
`NTL::vec_pair_ZZ_pX_long::~vec_pair_ZZ_pX_long()'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text+0x6be):BerlekampTest.cpp:
undefined reference to
`NTL::vec_pair_ZZ_pX_long::~vec_pair_ZZ_pX_long()'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTLgtERKNS_2ZZES2_[NTL::operator>(NTL::ZZ
const&, NTL::ZZ const&)]+0x18):BerlekampTest.cpp: undefined reference
to `_ntl_zcompare'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTLltERKNS_2ZZES2_[NTL::operator<(NTL::ZZ
const&, NTL::ZZ const&)]+0x18):BerlekampTest.cpp: undefined reference
to `_ntl_zcompare'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTL4swapERNS_5ZZ_pXES1_[NTL::swap(NTL::ZZ_pX&,
NTL::ZZ_pX&)]+0x14):BerlekampTest.cpp: undefined reference to
`NTL::swap(NTL::vec_ZZ_p&, NTL::vec_ZZ_p&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTL2ZZD1Ev[NTL::ZZ::~ZZ()]+0xd):BerlekampTest.cpp:
undefined reference to `_ntl_zfree'

C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTL5ZZ_pXD1Ev[NTL::ZZ_pX::~ZZ_pX()]+0xd):BerlekampTest.cpp:
undefined reference to `NTL::vec_ZZ_p::~vec_ZZ_p()'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTLeqERKNS_5ZZ_pXES2_[NTL::operator==(NTL::ZZ_pX
const&, NTL::ZZ_pX const&)]+0x14):BerlekampTest.cpp: undefined
reference to `NTL::operator==(NTL::vec_ZZ_p const&, NTL::vec_ZZ_p
const&)'
C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTL7GetTimeEv[NTL::GetTime()]+0x7):BerlekampTest.cpp:
undefined reference to `_ntl_GetTime'
collect2: ld returned 1 exit status

Execution terminated

Oct 10 '06 #1
1 3804
On 9 Oct 2006 19:02:44 -0700, "jarod" <ch*******@hotmail.comwrote:
>C:\DOCUME~1\chiang\LOCALS~1\Temp/cc44aaaa.o(.text$_ZN3NTL7GetTimeEv[NTL::GetTime()]+0x7):BerlekampTest.cpp:
undefined reference to `_ntl_GetTime'
collect2: ld returned 1 exit status

Execution terminated
Those are probably linker errors. You need to add the appropriate
lib(s) as input for the linker according to the requirements of your
system.

Good luck,
Roland Pibinger
Oct 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Luca | last post: by
reply views Thread by Francisco J. Reyes | last post: by
reply views Thread by Budhi Saputra Prasetya | last post: by
3 posts views Thread by Krishna Kirti Das | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.