IA64 Build of program results in "application cannot be run in Win

Discussion in 'Windows Vista Drivers' started by Daniel, Dec 9, 2005.

  1. Daniel

    Daniel Guest

    Hi all,

    I'm trying to build an IA64 program using the IA64 DDK build enviroment.
    After an succesful build I get an "application cannot be run in Win32" error
    while trying to execute this program on a Itanium 2 machine.

    Build log shows:
    ---------
    BUILD: Examining d:\src\test directory for files to compile.
    Compiling (NoSync) d:\src\test directory ********************
    'nmake.exe /nologo BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 IA64=1'
    cl -nologo -Iia64\ -I. -IC:\WINDDK\3790~1.183\inc\mfc42
    -Iobjfre_wnet_IA64\ia64 -IC:\WINDDK\3790~1.183\inc\wnet
    -IC:\WINDDK\3790~1.183\inc\wnet -IC:\WINDDK\3790~1.183\inc\crt /MT /U_MT
    -D_WIN64 -D_IA64_=1 -DIA64=1 -DNO_HW_DETECT -D_MSC_EXTENSIONS
    -DCONDITION_HANDLING=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1
    -D_WIN32_WINNT=0x0502 /DWINVER=0x0502 -D_WIN32_IE=0x0603
    -DWIN32_LEAN_AND_MEAN=1 -D_MERCED_A0_=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK
    -DFPO=0 -DNDEBUG /c /Zl /Zp8 /Gy /W3 /Wp64 /WX /EHs-c- /GR- /GF /GS
    -Z7 /Oxs /QIPF_fr32 -FIC:\WINDDK\3790~1.183\inc\wnet\warning.h
    ..\test.cpp
    test.cpp

    Stop.
    Linking d:\src\test directory ********************
    'nmake.exe /nologo BUILDMSG=Stop. -i LINKONLY=1 NOPASS0=1 NTTEST= UMTEST=
    IA64=1'
    link -out:eek:bjfre_wnet_IA64\ia64\TEST.exe -machine:ia64
    @C:\DOCUME~1\grund\LOCALS~1\Temp\nm42.tmp
    Microsoft (R) Incremental Linker Version 8.00.40310.39
    Copyright (C) Microsoft Corporation. All rights reserved.

    -MERGE:_PAGE=PAGE
    -MERGE:_TEXT=.text
    -SECTION:INIT,d
    -OPT:REF
    -OPT:ICF
    -IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4006,4044,4108,4088
    -INCREMENTAL:NO
    -FULLBUILD
    /release
    -NODEFAULTLIB
    /WX
    -debug
    -debugtype:cv
    -version:5.2
    -osversion:5.2
    -debugtype:pdata
    -merge:.rdata=.text
    /pdbcompress
    -STACK:0x100000,0x4000
    -subsystem:native,5.02
    -base:mad:C:\WINDDK\3790~1.183\bin\coffbase.txt,usermode
    -entry:NtProcessStartupForGS
    objfre_wnet_IA64\ia64\test.obj
    C:\WINDDK\3790~1.183\lib\wnet\ia64\BufferOverflow.lib
    C:\WINDDK\3790~1.183\lib\wnet\ia64\ntdll.lib
    C:\WINDDK\3790~1.183\lib\wnet\ia64\nt.lib
    echo Skip Binplace:
    Skip Binplace:

    Stop.
     
    Daniel, Dec 9, 2005
    #1
    1. Advertisements

  2. Daniel

    Tim Roberts Guest

    Are you running the Itanium edition of Windows Server 2003? 64-bit apps
    only run on a 64-bit operating system.
     
    Tim Roberts, Dec 10, 2005
    #2
    1. Advertisements

  3. Daniel

    Daniel Guest

    Hi Tim,
    Thanks for responding.
    Yes it is .... extract from msinfo32

    OS Name Microsoft(R) Windows(R) Server 2003, Datacenter Edition
    Version 5.2.3790 Build 3790
    OS Manufacturer Microsoft Corporation
    System Manufacturer hp
    System Model workstation zx2000
    System Type Itanium (TM) -based System
    Processor ia64 Family 31 Model 0 Stepping 6 GenuineIntel ~1000 Mhz
    BIOS Version/Date HP 02.31, 3/11/2004
    SMBIOS Version 2.3
    Windows Directory C:\windows
    System Directory C:\windows\system32
    Boot Device \Device\HarddiskVolume4
    Locale United States
    Hardware Abstraction Layer Version = "5.2.3790.73 (srv03_qfe.030614-1407)"
    User Name Not Available
    Time Zone Romance Standard Time
    Total Physical Memory 2,048.00 MB
    Available Physical Memory 1.31 GB
    Total Virtual Memory 5.84 GB
    Available Virtual Memory 4.71 GB
    Page File Space 3.85 GB
    Page File C:\pagefile.sys
     
    Daniel, Dec 12, 2005
    #3
  4. Looks like you are creating an application for the Native Subsystem.
    Those normally can only be run from smss.exe.
    Is this intentional and expected ?
     
    Ivan Brugiolo [MSFT], Dec 13, 2005
    #4
  5. Daniel

    Daniel Guest

    Hi Ivan,

    Ehhh, no.... just want to write an console app.
    What am I missing here?
     
    Daniel, Dec 13, 2005
    #5
  6. Can you post your `sources` file ?

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of any included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm


     
    Ivan Brugiolo [MSFT], Dec 13, 2005
    #6
  7. Daniel

    Daniel Guest

    file contains:
    ----
    TARGETNAME=TEST
    TARGETTYPE=PROGRAM
    TARGETPATH=obj$(BUILD_ALT_DIR)
    SOURCES=test.cpp
    TARGETPATHLIB=$(SDK_LIB_DEST)
     
    Daniel, Dec 16, 2005
    #7
  8. There's too little. Try something more complete

    TARGETNAME=test
    TARGETPATH=$(0)
    TARGETTYPE=PROGRAM

    TARGETLIBS=\
    $(SDK_LIB_PATH)\kernel32.lib

    _NT_TARGET_VERSION = $(_NT_TARGET_VERSION_WINXP)

    USE_MSVCRT=1
    USE_NATIVE_EH=1
    USE_STL=1
    STL_VER=70

    UMENTRY=wmain
    UMTYPE=console
    #USE_NTDLL=1

    INCLUDES=\
    $(DDK_INC_PATH);

    SOURCES=\
    test.cpp

    --
    --
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of any included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm
     
    Ivan Brugiolo [MSFT], Dec 16, 2005
    #8
  9. USE_NATIVE_EH=1
    Yes. BTW - USE_NATIVE_EH is mandatory for STL usage. USE_STL is IIRC not so :)
     
    Maxim S. Shatskih, Dec 16, 2005
    #9
  10. Excessive cut-and-paste syndrome. :)
     
    Ivan Brugiolo [MSFT], Dec 16, 2005
    #10
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.