I'm not yet a fan of integrated development environments, but I'm trying to overcome my prejudices and learn Xcode. (Eclipse/CDT is next; I couldn't get that to work for me either when I tried last year, but that's a separate issue.)
I am writing some new code in a new project that will become (part of) a small library. I want to unit test it, too. How do I explain to Xcode that I'm building a (shared) library, but I also want to use it in a test program, compiled from separate source that won't be in the shared library?
Source code:
- atom.c
- atom.h
- test-atom.c
Produced files:
- libatom.dylib
- test-atom
I've got atom.c
and atom.h
compiled into the library. I'm just not sure how to organize things so that I can also build test-atom
to link with the library.
I'm assuming that when I've got that sorted, adding the library for the test support code that test-atom.c would be relatively straight-forward - even though it isn't under Xcode control yet.
FWIW, I primarily work in C rather than Objective C.