Skip to content

Instantly share code, notes, and snippets.

@errpr
Last active December 28, 2018 23:12
Show Gist options
  • Save errpr/e688a12be7ff215d7bc22f24fbe5dd24 to your computer and use it in GitHub Desktop.
Save errpr/e688a12be7ff215d7bc22f24fbe5dd24 to your computer and use it in GitHub Desktop.
#include "library.h"
void LibraryFunction()
{
int success = 1;
if (success)
{
LogPrint("Success!");
}
else
{
LogPrint("We messed up.");
}
}
#ifndef LIBRARY
void LogPrint(char *String);
void LibraryFunction();
#define LIBRARY
#endif
#include "library.h"
#include "library.c"
void LogPrint(char *String)
{
puts(String);
}
int main(int argc, char const *argv[])
{
LibraryFunction();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment