C> wehn i try to compile something a with it, (a c++ file)
The file specified for a build must contain a main()
function. This is the function called by the startup code
in the RTL. Since it is not in the source being compiled,
you get an error telling you that you must have one.
If you only meant to compile the code to .OBJ format in
order to create a linkable code object or library object,
then you need the proper command line switch to do so.
My tests indicate that you may have your main() function
in your #include file, also, though I've never seen any
code which utilizes this, and know of no reason to do so.
Functions in the #include file will have no knowledge of
functions contained in the code file and can not call them.
Generally speaking, an #include file should contain no
code at all. All associated code should be placed into
precompiled linkable code object libraries.
For the sake of argument and experimentation, however, it
is certainly possible.
In any case, your code must be complete, and begin with a
main() function in order to compile to an executable object.
> ] You can prove anything with a properly written benchmark....
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|