When making a DLL, I noticed that certain compiler options must be off in order 
for it
to work.

Problem:
I had both strip symbols option on and smart linking options on. The DLL did 
not work
(properly). Gave exceptions.

Solution:
I took all three of those options off and now the DLL works (properly).

Not sure if this is the case with GnuLinux .SO files, probably is.. I'll be 
doing work
there later today.

Now it's a matter of finding out which of those compiler option causes the 
problems
(unless someone here knows).. and since it does cause problems, I'll have to 
make a
writeup about this. I think we need a DLL template and more examples, so I'll 
upload
some. Once you have a working example, it's so much easier. Maybe even I could 
make a
lazarus "DLL wizard" out of it, or "Library wizard" in the case of other 
operating
systems.

Other notes I took:
Must have app gui option set. Command line programs do not work as DLL's! Maybe 
not so
in GnuLinux?
Must place "exports" clause in the program, not in any of the units. That 
should be
fairly clear, but sometimes you forget.

Lars



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to