
January 28th, 2006, 05:35 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Simple dylib/dll problems gcc
Hi guys,
I googled for how build a dylib/dll with gcc and found a few simple examples. I have a file with a single function in that just needs to be compiled to a dll so I can test out petite Schemes foreign function interface.
Code:
#include <stdio.h>
int test_function(int i)
{
return i - 1;
}
Should be easy right? However when trying to compile this I get an error about the symbol _main not being defined, understandable except that it should be compiling as a shared lib and shouldn't need main?
Could someone try compile this and maybe post the steps used from the command line?
Thanks guys its very appreciated,
Mark.
__________________
programming language development: www.netytan.com – Hula
|