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 

Building DLL's with data modules ... problem!

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Sun Aug 20, 2006 4:35 pm    Post subject: Building DLL's with data modules ... problem! Reply with quote

Smile Hi there! This is my first post ... so be gentle!

I use FTN95 for Net and Win32 (but still at version 4.0.0 ... this may be relevant!).

I have a project with a number of functions and subroutines together with a single data module (the regular stuff!). When everything is together as a single programme, it works fine ... no compiler errors or warnings. So, I thought, let's make it into a .DLL structure.

So, I carefully split out all functions and subroutines into individual units, compiled them with the command:

ftn95 /FULL_UNDEF /ZEROISE /FIXED_FORMAT %1 /MOD_PATH ..MODULES

Then combined all .OBJ files into a .DLL with a .lnk file containing the commands:

dll
lo *.obj
subsystem windows
exportall
file mydll

All seems to work as expected!

Then I run a test programme compiled with the commands:

ftn95 /ZEROISE /FIXED_FORMAT %1 /MOD_PATH MODULES

and link in the files with the commands:

echo subsystem windows > inttemp$.lnk
echo load %1 >> inttemp$.lnk
echo load mydll.dll >> inttemp$.lnk
echo load MODULESmydata_DATA >> inttemp$.lnk
echo file >> inttemp$.lnk
slink inttemp$.lnk

Everything works until I run the programme ... at which point I get an ACCESS VIOLATION initialising a matrix in the data module. This was not a problem in the full programme ... nor is it a problem if I build another test programme that simply initialises that matrix in the data module on its own - but using the mydll.dll. Very puzzling!

Has anyone any thoughts on the solution --- is it the compiler version? Is it a compiler option? Is it dirty programming that only becomes obvious in the .DLL environment.

All thoughts and comments very welcome. Thank you in anticipation.


Norm
Back to top
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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