PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Linking error (v12.8, stl_algo.h)

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
970980hs



Joined: 01 Jan 2014
Posts: 10

PostPosted: Mon Mar 10, 2014 3:21 pm    Post subject: Linking error (v12.8, stl_algo.h) Reply with quote

Hi~

Now, I try to compile the original codes by pgc++, which are compiled g++ well.
Compiling step is fine but there are endless errors in linking step.

Actually, almost errors are like that:

aaa.cpp : undefined reference to '__blt_pgi_clzl'
aaa.o: In function 'std::__lg(long)':
/usr/lib/gcc/x86_64-redhat-linux/include/c++/bits/stl_algo.h:2324:undefined referene to '__blt_pgi_clzl'
..

I think these errors are related to which library I should use.
How do I fix these errors?
Back to top
View user's profile
Deb Caruso



Joined: 15 Jan 2014
Posts: 6

PostPosted: Mon Mar 10, 2014 4:11 pm    Post subject: Reply with quote

You should probably link with pgc++.
__blt_pgi_clzl lives in libpgc.a

If you must use g++ to link, then you will need to add the pgi libraries
'pgc++ -dryrun t.o' will show you the link line that we use.
At a minimum, you will probably have to add something like
-L/usr/pgi/linux86-64/lib -lpgatm -lpgmp -lpgc
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group