Solved

not a valid win32 application?

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
chcp 65001 File encoding 66 272
Test the speeds on my PC Drives 12 62
A  &&  B  || (C||D) how it works in c 7 99
If a cell in a range equals "YES" return specific Test. 4 37
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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files 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.

839 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