0

I am using code::blocks and have written a dll. I am currently testing it but am getting tired of having to compile it, copy the DLL, DEF, H and A files into a test project, and then compiling the test project every time I need to fix something. Is there any easier way to test a DLL?

2
Contributors
6
Replies
9
Views
5 Years
Discussion Span
Last Post by Labdabeta
0

The only file you need in the test project folder is the *.dll. Actually, you can put it any of the folders listed in your PATH environment variable, such as c:\windows\system. As for the *.h file(s), just put the full path to where they are located in the include statement, e.g. #include "c:\mydir\test.h" Application programs do not need any of the other files you mentioned.

Edited by Ancient Dragon

0

Usually, you can put it any of the folders listed in your PATH environment variable, such as c:\windows\system. Af for the *.h file(s), just put the full path to where they are located in the include statement, e.g. #include "c:\mydir\test.h" Application programs do not need any of the other files you mentioned.

The problem is that I tried that and I got a ton of link errors! I know that that method worked for two other DLLs I made (one for random numbers, one for infinite math) I feel like I did something wrong in this DLL project's settings.

Edited by mike_2000_17: Fixed formatting

0

Yes, although my compiler called it MyDLLName.DLL.a I only get the link errors on some seemingly arbitrary functions. The link error I get looks like:
undefined reference to '_imp__LABglClose@4'

0

Aha! For some weird reason the default setting was for debug builds to NOT create .a files, so I was using files from my last Release build, which was incomplete.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.