Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,434 bytes added ,  17:39, 22 August 2011
no edit summary
Line 96: Line 96:     
== Using the Library in Your Own Program ==
 
== Using the Library in Your Own Program ==
 +
 +
=== Using SampleProgram as a starting point ===
 +
[https://github.com/statgen/SampleProgram https://github.com/statgen/SampleProgram] is a simple program demonstrating how to write a tool that uses libStatGen.  You can copy SampleProgram and use it as a starting point for your own program.
 +
 +
In the main SampleProgram directory, update ChangeLog, .gitignore, and README.txt as appropriate.
 +
 +
No changes to Makefile should be necessary.
 +
 +
Update Makefile.inc, replacing all occurrences of <code>LIB_PATH_SAMPLE_PROGRAM</code> with <code>LIB_PATH_YOUR_PROGRAM_NAME</code> where <code>YOUR_PROGRAM_NAME</code> is a unique name that can be used to set an environment variable to locate the library for your program.  (Most likely this won't need to be set, but is there in case you need it.)
 +
 +
 +
 +
SampleProgram has 4 subdirectories:
 +
* copyrights - contains the copyright information, add your own copyrights as necessary
 +
* obj - this directory is where the object files are placed when the code is compiled (with a subdirectory for debug and profile objects)
 +
* src - this is where your own program code goes
 +
* test - this is where your test code goes.  Test code can be setup to run with <code>make test</code> to ensure the program works properly.
 +
 +
=== Working from Scratch ===
 +
When compiling your code, be sure to include the library header files found in libStatgen/include/ and link in the appropriate library (opt, debug, or profile).
 +
 +
 
<span style="color:#B22222">Coming Soon</span>
 
<span style="color:#B22222">Coming Soon</span>
 +
    
''' Below are the outdated instructions for <code>statgen</code>
 
''' Below are the outdated instructions for <code>statgen</code>

Navigation menu