Skip to content

Instantly share code, notes, and snippets.

@bigbeno37
Created July 21, 2017 01:47
Show Gist options
  • Save bigbeno37/0071611a17e7afd0d93100ec9c7ada90 to your computer and use it in GitHub Desktop.
Save bigbeno37/0071611a17e7afd0d93100ec9c7ada90 to your computer and use it in GitHub Desktop.
Multiple C files
gcc main.c utils.c -o runMe
#include <stdio.h>
#include "utils.h"
int main() {
printf(helloWorld());
return 0;
}
//
// Created by bigbeno37 on 21/07/17.
//
char *helloWorld() {
return "Hello world!\n";
}
//
// Created by bigbeno37 on 21/07/17.
//
#ifndef MYFIRSTPROJECT_UTILS_H
#define MYFIRSTPROJECT_UTILS_H
char *helloWorld();
#endif //MYFIRSTPROJECT_UTILS_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment