Page 1 of 2
Compiling problemh
Posted: Wed Feb 16, 2011 6:43 pm
by Lanac
OK, need some help about programing. I am making a program in .bat
Is there any way to compile .bat to .exe and .run(for linux)
Posted: Wed Feb 16, 2011 7:20 pm
by pmd
bat is script(file with windows console commands)
exe is compiled executable code
Posted: Wed Feb 16, 2011 7:22 pm
by Quarko
Lanac, please tell us exactly what are you trying to do. What you are asking us is impossible.
Posted: Wed Feb 16, 2011 7:24 pm
by Lanac
Im sorry im asking imposible, i was just having a thought. I was asking, for test, is it possible in .bat that have command:
Code: Select all
echo on
echo testing
echo bat
echo file
and make it in .exe or .run?[/code]
Posted: Wed Feb 16, 2011 7:39 pm
by Quarko
No, if you want to compile it, you will need C++.
Posted: Wed Feb 16, 2011 8:02 pm
by Lanac
:/
anyone have code for it?
but for visual basic
![Smile :)](./images/smilies/icon_smile.gif)
Posted: Wed Feb 16, 2011 9:13 pm
by pmd
what you want?
execute simple code trough something?
Posted: Wed Feb 16, 2011 9:49 pm
by Lanac
I want to make .exe that runs cmd and in cmd make command echo without typing. i use visual basic
Posted: Thu Feb 17, 2011 9:20 am
by Lanac
Anyone can help?
I think visual basic have c++, but im not so sure.
Posted: Thu Feb 17, 2011 9:30 am
by Quarko
Imagine there is a road. You can drive there on a car, on a bike, on a plane, on other stuff too.
Now, C++ is a car. VisualBasic is a bike. Java is a plane.
Batch files are papers with instructions like: "Sit in the car, drive 100 meters, then take a plane and fly 2km".
Is that more clear now?
VisualBasic has nothing common with C++ but the fact they both can be compiled to bytecode.
If you need VisualBasic application - google for "linux visualbasic compiler" and cross your fingers for better results.
Posted: Thu Feb 17, 2011 10:59 am
by Lanac
I dont understand >.<
U say that i cant make program in visual basic that opens cmd and make commands in cmd, or...?
i mean, if i cant make form .bat to .exe, can i atleast make a code in visual basic, or what i have to do?
Im not so good programer to know everything :/
Posted: Thu Feb 17, 2011 11:15 am
by Quarko
Ok, I give up. Somebody else explain him please.
Posted: Thu Feb 17, 2011 1:58 pm
by pmd
Lanac wrote:I want to make .exe that runs cmd and in cmd make command echo without typing. i use visual basic
you want vb .exe, this exe will execute bat-script(shell script), and script will execute commands
use vb function
shell for executing .bat
but on linux(bsd, mac, unix, etc.) we have other console - bash(and some other shells), you need to convert dos/windows shell commands into bash commands, then save this commands into .sh file.
now about languages: use multi-platform languages if want got same results (of your programs) on different os
Posted: Thu Feb 17, 2011 4:41 pm
by Quarko
pmd, I think you misunderstood his request a bit. He wants to make an 'exe' for linux that does the same thing as his bat file does: printing the text out and launching other applications.
Posted: Thu Feb 17, 2011 4:57 pm
by pmd
so he just need shell script?