forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error 404 - Cannot find definition for MODULE NM_LIB

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
for_tran



Joined: 20 Aug 2008
Posts: 3

PostPosted: Fri Aug 22, 2008 8:54 am    Post subject: error 404 - Cannot find definition for MODULE NM_LIB Reply with quote

Hi all. Please could anyone help in sorting out his error message i have. I created a dll project (saved directly in c:/), added existing library files from a folder by doing: source-----> add existing items and then adding the library files. I then built the library successfully.

Next I opened another project, and
1.) Added the source or main program that uses the library by doing:
2.) References---->add reference. At this stage I added the dll file in the 'checkmate'---->win32 folder directory of the built library project as the reference.

Next I try to build the main program but get the error message above-error 404 - Cannot find definition for MODULE NM_LIB.

The library module interface for all the subroutines in the library is also in the dll project along with all the library subroutines. The MOD files generated after building the library is in drive c:/ and not in the 'checkmate' -----> win32 folder where the '.dll' file is.

One more thing is there a reason why i cannot create two separate projects in the same directory? Thanks a lot
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Aug 22, 2008 10:57 am    Post subject: Reply with quote

I think that you need a copy of the mod files in project folder (the one that contains your .ftn95p file for the project). The alternative is to use /MOD_PATH on the command line to show the compiler where to find the mod files.

Plato does not allow you to create more than one project in a folder because the sub-folders for the build processes need to be independent.
Back to top
View user's profile Send private message AIM Address
for_tran



Joined: 20 Aug 2008
Posts: 3

PostPosted: Fri Aug 22, 2008 3:24 pm    Post subject: Where to place data file Reply with quote

Hey thanks a lot Paul, I set the mod path and it worked. Sorry this might seem like a strange question but i get this "Attempt to read past end-of-file
" message whenever i run the program. I put the data file in the Project folder or should it have been somewhere else? There is nothing wrong with the data in the data file, the program runs in a different environment. Is there any particular place to put the data file? Thanks.
Back to top
View user's profile Send private message Send e-mail
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Fri Aug 22, 2008 4:14 pm    Post subject: Reply with quote

Try putting it with the .exe file

Ian
Back to top
View user's profile Send private message Send e-mail
for_tran



Joined: 20 Aug 2008
Posts: 3

PostPosted: Fri Aug 22, 2008 4:52 pm    Post subject: Reply with quote

Have tried that, but will go over everything thing in the code again to make sure I have not missed anything. Thanks
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Aug 25, 2008 1:03 pm    Post subject: Reply with quote

Yes it would normally go with the .exe unless you provide the full path for the file.

If you use IOSTAT with the OPEN statement then you can check the value of the IOSTAT variable for successful open.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Aug 26, 2008 9:27 am    Post subject: Reply with quote

I seem to think that if you execute the program from within plato, it expects the default location for the data file to be in the same location as the source.

If you run the executable from where it is stored, it will expect the data file where the executable is.

If you open the file with a status='unknown', then it will create an empty file if it does not exist and you will get an attempt to read past end of file error. Try opening it and then doing an inquire on the open file, that should return the fully qualified path name. i.e.


Code:

winapp
character*256 full_name
open(unit=10,file='mylostfile.txt',status='unknown')
inquire(unit=10,name=full_name)
print *,trim(full_name)
end


I've just tried it and that is the case - two different places!
Regards

Ian
PS, see also
SUBROUTINE ATTACH@(PATH,ERROR_CODE)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
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 © 2001, 2005 phpBB Group