Silverfrost Forums

Welcome to our forums

error 404 - Cannot find definition for MODULE NM_LIB

22 Aug 2008 7:54 #3724

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

22 Aug 2008 9:57 #3725

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.

22 Aug 2008 2:24 #3726

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.

22 Aug 2008 3:14 #3727

Try putting it with the .exe file

Ian

22 Aug 2008 3:52 #3728

Have tried that, but will go over everything thing in the code again to make sure I have not missed anything. Thanks

25 Aug 2008 12:03 #3730

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.

26 Aug 2008 8:27 #3742

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.

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)

Please login to reply.