Making an OBJ-File out af an EXE-File 
Author Message
 Making an OBJ-File out af an EXE-File

Hi!

I've written an Pascal-code in which you can see an image. Now I want
to include it into an C-source ... I've converted it with bin2obj to
from an EXE to an OBJ-File, but when I call it (also when I call it in
Pascal) the system hangs???

Can someone help me???

Andi
----------- BurnA ------------------------------------------

   voice :  0222-8699765       ( +43 1 8699765 )
   Fax:  :  0222-8699765       ( +43 1 8699765 )



Wed, 18 Jun 1902 08:00:00 GMT  
 Making an OBJ-File out af an EXE-File

Quote:

>Hi!
>I've written an Pascal-code in which you can see an image. Now I want
>to include it into an C-source ... I've converted it with bin2obj to
>from an EXE to an OBJ-File, but when I call it (also when I call it in
>Pascal) the system hangs???
>Can someone help me???

That's not the way to use BinObj. It can be used to include one single
procedure that is given in binary (I've never seen that), or (usually)
to include binary data into your program.

Now, for your problem, the easiest thing would be to call the Exe of
the pascal prog from the C prog. In pascal, that would be done with
the Exec procedure (unit Dos). In C there's a similar function,
I don't know its name.

I don't know of any way to include TP into C programs. This is mainly
because TP doesn't generate Obj files (but Tpus). Other pascal compilers
(Gnu, ...) might do. OTOH, you can include Objs from C files into
pascal programs. This is described in the TP manuals. Then, of course,
the main program would have to be in pascal (but you could write a
wrapper to call the C prog's main function).

Hope this wasn't too confusing,
Frank



Wed, 18 Jun 1902 08:00:00 GMT  
 Making an OBJ-File out af an EXE-File

: I've written an Pascal-code in which you can see an image. Now I want
: to include it into an C-source ... I've converted it with bin2obj to
: from an EXE to an OBJ-File, but when I call it (also when I call it in
: Pascal) the system hangs???

That's because C is looking for a procedure, and you're giving it an
executable file... to my knowledge, you cant DO what you're trying to,
though a c routine in pascal works.  (Because C lets you save in
objects..at least, Watcom C does..)

You MAY want to try making the pascal code into an object, and then
binobj'ing that, and declare the procedures as normal externals, with
pascal parameters, of course...I dont know if this will owrk, but it's
worth a try..

-=- Mephistoe       -=- If you see a meaningful, touching quote here...

-=- Hacsoft '96     -=- ...you must be mistaking me for someone else.
OmniQuote2k -=- 04:13.06 -=- Fri,06/07/1996
"I always thought I radiated spam." -The Hac



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can a .exe file runs in DOS has windows?(Made in Turbo Pascal)

2. Making .exe files

3. Font files compiled to .OBJ files.

4. file.exe not file.pas

5. file.exe not file.pas

6. which files do I include with exe file?

7. convert *.exe files to *.pas files

8. BGI file linked in EXE file?

9. Adding data files to EXE file - HELP!

10. Appending exe to exe file

11. BGI font .OBJ files.

12. What kinds of .OBJ files are there?

 

 
Powered by phpBB® Forum Software