View Full Version: Help With DLLs

C++ Learning Community > Other Programing Languages > Help With DLLs


Title: Help With DLLs


Scrappersa - August 2, 2003 10:30 PM (GMT)
I don't know if this could go in this catagory because it was made with dev pascal but here it go's.
Ok, I used Irritant's DLL tutorial and somethings not working. I'm, using dev pascal. I hit file< new project. I click the type ofd file I want to make, dll. I say the project name dllmultiply. Then it asks me the folder I would like to save it in I made a new folder so I save it in that but the default file type is a dp (dev pascal). Then I type in this code.

library FirstDLL;
function MULTIPLY(argument0,argument1:real):real;cdecl;
begin
Result :=argumetn0*argument1;
end;
exports MULTIPLY;

begin
end.
I hit execute< compile and it asks where to save it again but as a .pas or a .pp file. I save it as untitled. Then a thing comes up and tells me if there were errors how many and the size of the output file in kb's. Then at the bottom of the program it say's error in resource file.

My question is, why isn't it turning into a .dll? It just makes 3 types o files. An .rc, a .dp, and a .pas.

ih8censorship - August 2, 2003 11:22 PM (GMT)
moved to other languages forum.


QUOTE
I hit execute< compile and it asks where to save it again but as a .pas or a .pp file. I save it as untitled. Then a thing comes up and tells me if there were errors how many and the size of the output file in kb's. Then at the bottom of the program it say's error in resource file.

My question is, why isn't it turning into a .dll? It just makes 3 types o files. An .rc, a .dp, and a .pas.


well my guess is your only saving it not actually compiling it, or because of errors maybey you cant compile it (compilers wont compile code with syntax errors, therefore it wouldent make a dll).

also make a name besides untitled for your program. after awhile folders can become cluttered with untitled1.pas untitled2.pas untitled.cpp untitled199784.cpp you get the idea.

hope some of this helps!

Scrappersa - August 3, 2003 12:13 AM (GMT)
Thank u, do u see an error?

Xception - August 3, 2003 08:49 AM (GMT)
You wrote here:
Result :=argumetn0*argument1;
I don't know if this is a typo here but in the function head you wrote argument0, not argumetn0.
And I'm not sure but I think in DevPascal you have to use MULTIPLY:=argument0*argument1; and not result:=argument0*argument1;
Where did the compiler find the error, what line number?

Scrappersa - August 3, 2003 08:29 PM (GMT)
It was wierd, It didn't display the amount of errors but at the bottom of the screen it said error in resource file. I redid it like this but I'll try ur way in a sec:

library FirstDLL;

function MULTIPLY(argument0,argument1:real):real;cdecl;
begin
Result := argument0*argument1;
end;

exports Multiply;

begin
end.




* Hosted for free by InvisionFree