I've found thinks on this in other places, But even when I used premade headers from my compiler ( Dev C++) which should be called Devil C++ in my opinion, and replaced all the code from one and altered it to be in C ( as to my knowledge) I keep on getting an error or 2 ( I've seen others talk about this error though). can you guys walk me through making my own headers( if i learn how to do non standard based C headers I might try and make a mini program that I think could work as an OS, And yes I've tried assembly language before ( I think I can ask my uncle as one of them has done robotics). the errors I get are
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
C:\Users\roddy\ Documents\RAD Studio\7.0\Demo s\CPP\Apps\Imag eProc\Makefile. win [Build Error] [Project1.exe] Error 1
my code is:
random.c
and
the original header and source I took some of this from was ABOUT.h,About.c I believe.
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
C:\Users\roddy\ Documents\RAD Studio\7.0\Demo s\CPP\Apps\Imag eProc\Makefile. win [Build Error] [Project1.exe] Error 1
my code is:
random.c
Code:
#include <math.h> #include "random.h" double xrt( unsigned long long i, unsigned long long y){ double x = 0.0; x=pow(y,1/i); return x; } double log_x( unsigned long long c, unsigned long long p){ double x = 0.0; x=log(c)/log(p); return x; }
Code:
//--------------------------------------------------------------------------- #ifndef randomH #define randomH //--------------------------------------------------------------------------- #include <math.h> #endif double xrt( unsigned long long i, unsigned long long y); double log_x(unsigned long long c,unsigned long long p);
Comment