Amaltheia C++ library: No Main() function?

W

wayne.denier

Ran across this well documented, nice looking library for C++ gaming
called Amaltheia ( http://home.gna.org/amaltheia/ ), but they don't
have a community :p. I'm not sure if anybody has used it before, but
the guys tell you not to write a main() function, that their library
does it for you. You specify constructor, loop, a destructor functions.
It all sounds good except that after compiling, my linker throws up,
saying..

Error: Unresolved external '_main' referenced from
C:\CBUILDERX\LIB\C0X32.OBJ

The linker must want a main function. Maybe someone's seen this happen
with another library that avoids using a main(). I'd really like to
use this. I'm using Borland's BuilderX compiler, but when i used
Borland 5.5 compiler at work it gave me the same thing.
 
E

Eric Jensen

[snip]
Error: Unresolved external '_main' referenced from
C:\CBUILDERX\LIB\C0X32.OBJ

The linker must want a main function. Maybe someone's seen this happen
with another library that avoids using a main(). I'd really like to
use this. I'm using Borland's BuilderX compiler, but when i used
Borland 5.5 compiler at work it gave me the same thing.

As you said your self the linker can not find the main() function inside the
library you uses. You get the error because the standard library object file
borland links has a reference to the main function. This can happen for more
reasons, but my guess is that it might be because the linker links the
c0x32.obj before it is linking the library you're using. You can set a build
order in project configuration in BCBX.

Or a work around could be keeping your own main function, and call the
librarys main from that one

//eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top