- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following recent discussions about removing redundant modules I thought I'd try the following with the idea that rather than going through each subroutine and commenting out each USE statement and then recompile to establish whether the module was actually used, I could remove each module from the application and see where the compiler complained about needing a parameter from the module (I thought I was probably being a bit optimistic to make this work for me) :
I added an empty module construct to one our my subroutines:
MODULE BORIS
END MODULE
I added a USE BORIS statement in a subroutine somewhere else in my application and built the solution. No problem!
I removed the module BORIS from my application and built the solution. To my surprise there was no problem!!
I then changed the name of the USE statement and built the solution. This time I got error 7002: error in opening the compiled module file.
This doesn't seem to me to be logical? Any views?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I think that when you remove a module from the solution, the corresponding .mod file is not deleted from the build directory (debug or release). To be sure, clean your solution after removing elements from the solution or delete .obj and .mod files manually.
I think that when you remove a module from the solution, the corresponding .mod file is not deleted from the build directory (debug or release). To be sure, clean your solution after removing elements from the solution or delete .obj and .mod files manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that's correct - I was aware but had forgotten about that little gem. Should not the compiler guard against that though? The clean option, if I recall correctly, simply deletes all the files from the build directory so if the application is large then it is a little radical and can lead to unneccesary recompilation.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page