Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SDL & C++Builder 5.0

0 views
Skip to first unread message

Luca

unread,
Dec 7, 2002, 7:03:05 AM12/7/02
to
I have downloaded SDL version 1.2.5. When I write a program the linker of
C++ Builder 5 gives me this error:

[Linker Error] Unresolved external '_main' referenced from
C:\BORLAND\CBUILDER5\LIB\C0X32.OBJ

Can anyone tell me why?

Ed Mulroy [TeamB]

unread,
Dec 7, 2002, 11:50:25 AM12/7/02
to
That error is complaining that it cannot find the funtion main. That error
is what you would get if you were building a GUI program (a program that
starts at the function WinMain) but the project was set up to build a
console mode (text mode, starts at main) program. (c0x32.obj is the
compiler's startup code for a console mode program)

When a project is created is when the target type is set. I do not think it
is easy to change the target type afterwards. Create a new project and set
it for a GUI target. (File|New|Application or File|New|Console_Wizard and
put a check in the GUI checkbox)

. Ed

Martin Bickel

unread,
Dec 8, 2002, 4:24:41 PM12/8/02
to

Did you include the file SDL_main.c in your project ? It provides the
main funktion, does some initialization stuff and then calls your own
main function (which has been renamed through a macro)

Martin

0 new messages