Solved

not a valid win32 application?

Posted on 2003-11-05
5
774 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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 and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

762 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