Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redefine Target error

Status
Not open for further replies.

DanSandbergUCONN

Programmer
Jun 13, 2007
14
US
Hi - I received a source from someone else who compiles exclusively for windows and linux. I want to recompile the source for my mac so I opened all the subroutines, modules, and interfaces in the AbsoftTools Compiler and tried to build. I got the following error:

error on line 1719 of ./mkdep/mkdep_MOPAC2009.amk: make error: cannot define target twice
attempting to redefine target "./build/vastkind.o" "./build/vast_kind_param.mod" as "./build/vastkind.o" "./build/vast_kind_param.mod" .


Does anyone know what caused this error (according to my friend the source compiles fine on the PC)? I apologize for my stupidity. My specialty is in running the software, not compiling it! -- Thanks,
Dan

 
Don't quite understand what you mean by opening all the subroutines, modules and interfaces. Do you have a bunch of source? Some of them are probably sources and others might be include files. You have to see what the sources do. If the filename appears in other files, it is an include file and should be taken out of the list of files to be compiled.
 
My apologies. I have several Fortran files, separated into folders called subroutines, modules, and interfaces. There is also a folder called includes. Total there are about 400 files. I can "open" them all in AbsoftTools and the program places the files where they are supposed to go. The build then runs the commands needed to generate an executable from the files. Unfortunately it appears there is a problem with the source somewhere. Now since the code was compilable on my friend's windows machine I am thinking that the compilation error is my fault. What else can I say to help someone knowledgable about Fortran help me troubleshoot this? Thanks.
 
I took the source from all the folders and combined it into one big folder. Turns out that there is more than one subroutine with the same name. I simply took one and deleted the other and the problem disappeared.
 
I still can't build successfully though. There are two undefined symbols, FLUSHM and GETENVQQ. I suspect that these are CPU and/or platform specific. Note that if I do not include the UNIX and VAX libraries in the compilation then roughly 8 undefined identifiers appear. Where can I find FLUSHM and GETENVQQ for my Intel MacBook? - Thanks, Dan
 
Sounds like a CVF or IVF thing.

For gentenvqq, include libpepcf90.lib in the link. There may be other characters like MT or MD depending on whether you are building single threaded, multithreaded or multithreaded using runtime DLLs. Don't know about flushm - may be in the same library
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top