|
|
| Dev-C++ and DLL files |
|
KaBlammyman
Member #455
June 2000
|
Okay, I need to use some functions that are in a DLL file I made in Dev-C++. I dont know how to link em' together in Dev-C++ as to get rid of the undefined reference" errors. Well, if it helps, I'm trying to re-compile the example (in Dev-C++) from this webpage: The DLL source compiled and made a DLL. How can I make Dev-C++ see the functions in the DLL so I can compile the exe? Thanx p.s. Google didnt help...too many people asked this same question and didnt get straight answers, and the ones who found the answer didnt share it with the world (or gave a vague description that doesnt help me)
|
|
Hrvoje Ban
Member #4,537
April 2004
|
When DLL is compiled you'll have two files: <dll name>.dll and lib<dll name>.a file. Link with later. |
|
KaBlammyman
Member #455
June 2000
|
tried that...and i also tried adding the .def file (--def foo.def) and it didnt work. Any other ideas...or is this something that the developers on dev-c++ messed up on. I'm gonna send them an email.
|
|
Johan Halmén
Member #1,550
September 2001
|
If you link with your .a and it doesn't work, your .a file is bad. Or you have wrong order in the .a files. liballeg.a should be the last one. When you choose Project, Project Options, Parameters and look at the Linker window to the right, you see a list of .a files you link with. In this list liballeg.a should be the last one. Or you might have -lalleg there. It is a plain text window with line breaks. Just edit it. In my present project, my Linker window says: The funny paths I get when I use the browser behind the "Add Library or Object" button. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
|
KaBlammyman
Member #455
June 2000
|
Im not sure if I understand you correctly...but I'm not using allegro for this particular project. AS I said in the previous thread, I want to compile and run the example from this website: I didnt modfiy the code, so I dont know how the .a file can be bad.
|
|
Marco Radaelli
Member #3,028
December 2002
|
Post the full command you use to compile the program plus all the errors you get I'm not registered at codeproject.com, so if you can attach both files to the post, I can give them a look
|
|
BAF
Member #2,981
December 2002
|
You can register easily |
|
Marco Radaelli
Member #3,028
December 2002
|
Thank you Going to give a look at that code
|
|
KaBlammyman
Member #455
June 2000
|
anybody else tried to run the code?
|
|
Marco Radaelli
Member #3,028
December 2002
|
Sorry I was forgetting about this I tried it, well, it does compile, make the dll and I can make the executable.
|
|
umperio
Member #3,474
April 2003
|
Quote:
or is this something that the developers on dev-c++ messed up on. I'm gonna send them an email.
I think before bothering Dev-Cpp developers you should first try to understand where the problem is. I've read some tutorials about dll creation and it seems to me that the code linked is not 100% standard. What I mean is none of the dll functions is exported in a header. So probably the error is just caused by the differences in how mingw (and not dev-cpp) and microsoft compiler manage dlls. |
|
|