By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,852 Members | 2,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,852 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Jun 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

<wa**********@gmail.com> wrote in message
news:11*********************@c74g2000cwc.googlegro ups.com...

[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
Jun 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.