>>Well I'll answer myself because I found a solution but I still don't know why it works.
>>After adding another case, I compile the main.prg program and then build the dll. This way I don't get the error and life is once again great.
>>What is mind boggeling is that I have the recompile all files checkbox checked when I build the dll so I can't understand why compiling the main.prg program should make a difference.
>>
>>So if someone could reply to this thread and let me know what is going on that would be great.
>
>I'm getting such quirks at times for the last... let's say since FP2.0.
>
>A similar error is when, occassionally, "Select myAlias" would do nothing - always on the same line. Or building an exe/app would always crash at the same position (had to watch the wait window to know which one was it).
>
>In such cases, just adding one line (empty, or a comment) or moving some code up and down was the cure. I have no explanation, and since it happens once a year or less often, I don't really care. First time it took me two hours to find out; second time it was about half an hour. Nowadays, even though it doesn't happen as often (maybe the last time was 18 months ago), I just add a comment and it starts working.
>
>My only explanation is that some combinations leave the compiler in an unhapy state... maybe it's a Christian and it gets scared when object code's mod(checksum, 0xfff)=0x666, who knows? Anything that throws the checksum off the doomed value fixes it.
>
>And yes, all the electronic chips are powered by magic smoke. Proof? When the smoke goes out, they're dead.
Thanks for the reply. I am glad to know that I am not the only one with such problems. Your explanation sounds good to me. The problem acctually also occured if I would put in empty lines in my code. The only change to main.prg would be an empty line and the dll wouldn't build correctly.
Einar
Semper ubi sub ubi.