User forums > Using Code::Blocks
Doing unit tests (cppunit)
kfmfe04:
That's better. I've never done plug-in development, but I assume that your test project should link with the plug-in library (is it a .a or .dll or .so)? Correct me if I'm wrong.
1. Is it a compile failure, a link failure, or a dependency failure which is preventing some automatic compile or link?
2. Specifically, what did you try that causes you to think a dependency failed (compile or link)?
3. Has the dependency succeeded under any condition? In other words, is it failing under a certain condition or does it always fail?
My setup is very similar to yours, but I have found that I DO NOT need to add any files from my real project to my test project - only the directory for the real project headers under the test project's build directory to search for.
--- Quote from: oBFusCATed on July 07, 2009, 11:38:30 am ---I've explained my setup in my first post (not very clear though, excuse me for that :( )
Here it is simplified:
1. my real project - in the current case a C::B plugin
2. my test project - do not like with the real project, because I don't export anything useful for testing. Instead I have added the files I want to test from the real project in the test project.
I've put the two projects in a workspace, then I've tried to make the test project depend on the real project (and vice versa) through "project -> properties -> project dependencies". I've not set any external dependencies, because the two output files don't depend on each other.
--- End quote ---
oBFusCATed:
I've found my problem ... the two projects need to have the same Targets, otherwise the dependencies doesn't work.
In my case my plugin project has only the default target, but my test project have the Debug/Release combo.
I've renamed default to be Debug and now it works....
Navigation
[0] Message Index
[*] Previous page
Go to full version