Solved

not a valid win32 application?

Posted on 2003-11-05
5
772 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

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…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

773 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