PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Changing extension of compiled libs and obj files under win

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



Joined: 11 Nov 2004
Posts: 20

PostPosted: Sun May 19, 2013 1:00 am    Post subject: Changing extension of compiled libs and obj files under win Reply with quote

Is there a way of telling the pgi compiler (c,C++) to edit and work with *.o files instead of *.obj, and with *.a files instead of *.lib files under Windows7. I use the command shell (cygwin) and have to compile a linux based programm package. All the make files refer to *.o and *.a files and I would have to change them by hand. Of course I do not know if a general change of the extensions would cause problems with the other PGI system files that have the extension *lib?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Mon May 20, 2013 10:00 am    Post subject: Reply with quote

Hi a_bra,

Quote:
Is there a way of telling the pgi compiler (c,C++) to edit and work with *.o files instead of *.obj, and with *.a files instead of *.lib files under Windows7.


Set the environment variable "PGI_OBJSUFFIX=o" to change the default object suffix.

The library extension is a bit more tricky since MS's link is use to create the libraries and perform the final link step. If you are using the "-l<libname>" flag, this will get resolved to "libname.lib". When using an ".a" suffix, you need to put the fully qualified path to the library on the link line. However, the better option here is to use a makefile variable for library extension names so either ".lib" or ".a" could be used. Hopefully this will only require a few changes in your makefile.

- Mat
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