Solved

not a valid win32 application?

Posted on 2003-11-05
5
771 Views
Last Modified: 2008-01-16
hi, i am linking a simple program to a file 'jvm.lib' (the JVM library, i am trying to write a simple JNI program, but that has little to do with my post i believe). I compile it using a makefile and BCC32 5.5. It compiles just fine, but when i execute i get a pop up window that says:

'Batchuser.exe is not a valid win32 application'

batchuser.exe is the name of the simple program i wrote. does anyone know how i can get this to compile and execute? thanks
0
Comment
Question by:pedron
5 Comments
 
LVL 3

Expert Comment

by:norsethomas
ID: 9700582

Pedron, could you tell us something about your environment (95,98,ME,XP,2000)
and what the compiler flags are.

Thomas
0
 
LVL 11

Expert Comment

by:KurtVon
ID: 9704379
Are you sure the compiler is set to make a Win32 program?  There is a special section of code that must be placed onto the beginning of any program, and it appears the compiler didn't add it to yours.
0
 

Author Comment

by:pedron
ID: 9742647
I solved it through a friend. He helped me adjust my parameters being passed to the ILINK program, the makefile was this:
BATCH=C:\Java\1421\lib\jvm1.lib
batchuser.exe: batchuser.obj $(BATCH)

    ilink32 /Tpe/ap/c/x/Gn c0x32 batchuser surscf,batchuser,, \
         noeh32 $(BATCH) import32 cw32

batchuser.obj: batchuser.c
    bcc32 -IC:\Borland\Bcc55\Include -c -RT- -x- batchuser.c

and it works just fine! (except for the debugging part! =)  thanks!
0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 10426311
PAQed, with points refunded (100)

amp
Community Support Cleanup Moderator
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now