Guyz Iam happy to say that i moved little.Iam able to run the exe file without header files.It just needed egavga.bgi graphic drive.So i have to copy my exe file and egavga.bgi to other system to make the exe work.My point is i want my program to create egavga.bgi dynamically such that exe file doesnt need it.Hence i tried following:

bgiobj egavga egavga_driver
tlib graphics+egavga

when i use

registerbgidriver(egavga_driver)

it says undefined symbol egavga_driver.

By doing so can i make my initgraph(&driver,&mode,"")
such that the exe file doesnt need egavga.bgi separtely in the disk

is it clear, let me know if any thing wrong

Recommended Answers

All 4 Replies

One method: append the driver to the end of your exe program (after the program has been compiled), then when your program starts up have it write that out to a file. I did something like that once and it worked. The last 4 bytes of the exe was an integer that represented the size of the file that was appended to the exe file, which allowed the program to know where in the exe file to find the file.

can you elaborate that little, if i place egavga.bgi in bin folder my program works fine.even when i place my exe file in other system with egavga.bgi in same folder,it works.i want to place my exe file only in other system and make it work,...help me

just write a small program that will append egavga.bgi to the end of the .exe file. Then when the .exe file starts up have it copy that to the bin directory that your program will also probably have to create.

Or, another alternative is to use an install program, something like InstallShield, that will put all files in their proper places.

I just remembered, there is a way to compile the BGI drivers into object code which then can be linked directly into your .EXE file. That's how I've done exactly what you're attempting.

I forgot how to do it (it's been years) but if you have the manuals, check in there. Otherwise try searching for BGI+BORLAND+OBJECT+FILE see what turns up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.