Tech Support > Microsoft Windows > Drivers > IA64 Build of program results in "application cannot be run in Win
IA64 Build of program results in "application cannot be run in Win
Posted by Daniel on December 9th, 2005


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 -outbjfre_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,408 9,4221,4108,4088,4218,4006,4044,4108,4088
-INCREMENTAL:NO
-FULLBUILD
/release
-NODEFAULTLIB
/WX
-debug
-debugtype:cv
-version:5.2
-osversion:5.2
-debugtypedata
-merge:.rdata=.text
/pdbcompress
-STACK:0x100000,0x4000
-subsystem:native,5.02
-base:@C:\WINDDK\3790~1.183\bin\coffbase.txt,usermo de
-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.
-------
Any ideas?

Posted by Tim Roberts on December 10th, 2005


Daniel <Daniel@discussions.microsoft.com> wrote:
Are you running the Itanium edition of Windows Server 2003? 64-bit apps
only run on a 64-bit operating system.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Posted by Daniel on December 12th, 2005


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

"Tim Roberts" wrote:

Posted by Ivan Brugiolo [MSFT] on December 13th, 2005


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 ?

--
--
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


"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:5738A003-3059-4223-970F-8468C98B4875@microsoft.com...


Posted by Daniel on December 13th, 2005


Hi Ivan,

Ehhh, no.... just want to write an console app.
What am I missing here?

"Ivan Brugiolo [MSFT]" wrote:

Posted by Ivan Brugiolo [MSFT] on December 13th, 2005


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


"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:116038B0-604A-4A51-AC68-0DC5DA4DB17D@microsoft.com...


Posted by Daniel on December 16th, 2005


file contains:
----
TARGETNAME=TEST
TARGETTYPE=PROGRAM
TARGETPATH=obj$(BUILD_ALT_DIR)
SOURCES=test.cpp
TARGETPATHLIB=$(SDK_LIB_DEST)
----

"Ivan Brugiolo [MSFT]" wrote:

Posted by Ivan Brugiolo [MSFT] on December 16th, 2005


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


"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:56915A93-FD9B-4B85-97FC-9CAE47B6E62D@microsoft.com...


Posted by Maxim S. Shatskih on December 16th, 2005


Yes. BTW - USE_NATIVE_EH is mandatory for STL usage. USE_STL is IIRC not so

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Posted by Ivan Brugiolo [MSFT] on December 16th, 2005


Excessive cut-and-paste syndrome. :-)

--
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


"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:u7sw6ynAGHA.2656@tk2msftngp13.phx.gbl...