Solved

not a valid win32 application?

Posted on 2003-11-05
5
770 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
Comment Utility

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
Comment Utility
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
Comment Utility
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
Comment Utility
PAQed, with points refunded (100)

amp
Community Support Cleanup Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

771 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

11 Experts available now in Live!

Get 1:1 Help Now