www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Cannot build simple Win32 console program

↑ ↓ ← "James" <ploppy.powell virgin.net> writes:
What am I doing wrong ??

I'm trying to get started with DM and I can't seem to get a simple win32
console program to build.
I'm using the win32 IDDE.

The .def file:

EXETYPE          NT
SUBSYSTEM        CONSOLE


The code:

#include <iostream.h>
void main ()
{
 cout << "Hello\n";
}


The build output:

Program
Files\dm\bin\sc.EXE -cpp -mn -C -WA -S -5 -a8 -c -gf -otest.objtest.c
Program Files\dm\bin\scpp.EXE -cpp -mn -C -WA -S -5 -a8 -gftest.c -otest.obj
Program Files\dm\bin\link.EXE /CO /NOI /DE /NOPACKF /XN /NT
/ENTRY:WinMainCRTStartup /BAS:4194304 /A:512  modflnm.LNK
Error: C:\PROGRAM FILES\DM\BIN\..\lib\SNN.lib(winstart)  (1231004): Symbol
Undefined _WinMain 16
Lines Processed: 843  Errors: 1  Warnings: 0
Build failed
Aug 09 2002
↑ ↓ Jan Knepper <jan smartsoft.cc> writes:
James wrote:

 What am I doing wrong ??

 Program
 Files\dm\bin\sc.EXE -cpp -mn -C -WA -S -5 -a8 -c -gf -otest.objtest.c
 Program Files\dm\bin\scpp.EXE -cpp -mn -C -WA -S -5 -a8 -gftest.c -otest.obj
 Program Files\dm\bin\link.EXE /CO /NOI /DE /NOPACKF /XN /NT
 /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512  modflnm.LNK

/ENTY:WinMainCRTStartup Remove that and it should be linking. Jan
Aug 09 2002
↑ ↓ "James" <ploppy.powell virgin.net> writes:
How do I do that through the IDDE.

project->settings->build-> ???


"Jan Knepper" <jan smartsoft.cc> wrote in message
news:3D53D9C8.A38202D2 smartsoft.cc...
 James wrote:

 What am I doing wrong ??

 Program
 Files\dm\bin\sc.EXE -cpp -mn -C -WA -S -5 -a8 -c -gf -otest.objtest.c
 Program


 Program Files\dm\bin\link.EXE /CO /NOI /DE /NOPACKF /XN /NT
 /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512  modflnm.LNK

/ENTY:WinMainCRTStartup Remove that and it should be linking. Jan

Aug 09 2002
↑ ↓ Jan Knepper <jan smartsoft.cc> writes:
Select "Console" under "Target Type" in the first "Tab" of "Project Settings"

Jan



James wrote:

 How do I do that through the IDDE.

 project->settings->build-> ???

 "Jan Knepper" <jan smartsoft.cc> wrote in message
 news:3D53D9C8.A38202D2 smartsoft.cc...
 James wrote:

 What am I doing wrong ??

 Program
 Files\dm\bin\sc.EXE -cpp -mn -C -WA -S -5 -a8 -c -gf -otest.objtest.c
 Program


 Program Files\dm\bin\link.EXE /CO /NOI /DE /NOPACKF /XN /NT
 /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512  modflnm.LNK

/ENTY:WinMainCRTStartup Remove that and it should be linking. Jan


Aug 09 2002
↑ ↓ → "James" <ploppy.powell virgin.net> writes:
Great, it worked !!


"Jan Knepper" <jan smartsoft.cc> wrote in message
news:3D53DCCC.2F6979D5 smartsoft.cc...
 Select "Console" under "Target Type" in the first "Tab" of "Project

 Jan



 James wrote:

 How do I do that through the IDDE.

 project->settings->build-> ???

 "Jan Knepper" <jan smartsoft.cc> wrote in message
 news:3D53D9C8.A38202D2 smartsoft.cc...
 James wrote:

 What am I doing wrong ??

 Program




 Program


 Program Files\dm\bin\link.EXE /CO /NOI /DE /NOPACKF /XN /NT
 /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512  modflnm.LNK

/ENTY:WinMainCRTStartup Remove that and it should be linking. Jan



Aug 09 2002