Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Jeffrey M Tomsak
Mon, 12 May 2003 10:59
learning WinAPI
Author: Jeffrey M Tomsak
Date: Mon, 12 May 2003 10:59
Date: Mon, 12 May 2003 10:59
11 lines
1406 bytes
1406 bytes
Ok, I'm a newbie at this Windows programming, and I'm running into problems. I'll have a lot more questions in the future, but for now: [Linker Error] Unresolved external '_main' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\C0X32.OBJ What does this mean, and how do I get rid of it? I'm trying to make a simple Win app. It seems more trouble than its worth, but in the long run it won't be. Jeff M T
Re: learning WinAPI
Author: Frank Eid
Date: Mon, 12 May 2003 11:11
Date: Mon, 12 May 2003 11:11
6 lines
1165 bytes
1165 bytes
> [Linker Error] Unresolved external '_main' referenced from C:\PROGRAM > FILES\BORLAND\CBUILDER6\LIB\C0X32.OBJ You have a reference to something in C0X32.OBJ somewhere on your code... Frank.
Re: learning WinAPI
Author: Buster
Date: Mon, 12 May 2003 11:38
Date: Mon, 12 May 2003 11:38
42 lines
2240 bytes
2240 bytes
"Jeffrey M Tomsak" <jerf_@hotmail.com> wrote in message
news:3ebf7e7d$1@newsgroups.borland.com...
> Ok, I'm a newbie at this Windows programming, and I'm running into
problems.
> I'll have a lot more questions in the future, but for now:
>
> [Linker Error] Unresolved external '_main' referenced from
C:\PROGRAM
> FILES\BORLAND\CBUILDER6\LIB\C0X32.OBJ
>
> What does this mean, and how do I get rid of it? I'm trying to make
a
> simple Win app. It seems more trouble than its worth, but in the
long run
> it won't be.
>
> Jeff M T
c0X32 contains startup code (the stuff that's executed before your
main or WinMain).
In this case, I would guess you're linking with the version of the
startup code that calls main, when in fact your main entry point is
WinMain ().
There are a couple of ways to make a windows app in the IDE.
1. (Using the VCL) Use File->New->Application, or use
File->New->Other... and select Application.
2. (Without the VCL) Use File->New->Other..., select Console Wizard
and uncheck the "Console App" box. This should create a project
containing instructions to link the correct startup code for calling
WinMain (): in the .bpr file,
...
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) $(OBJFILES)"/>
...
c0w32 is the correct version.
Best of luck.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads