undyshelts
asked on
Compiling in windows
Hey all,
I'm not sure if this is a C or C++ program i'm trying to compile, or if there's any difference between the two.
I'm trying to compile the ffmpeg source files (downloaded from here: http://ffmpeg.mplayerhq.hu/ffmpeg-checkout-snapshot.tar.bz2) for a windows platform.
I have Visual C++ 6 and .NET installed on my PC.
I don't know anything about compiling these programs.
How do I compile this program in the command line interface (IDE seems far more complicated at the moment)
Looking forward to your comments.
Andrew
I'm not sure if this is a C or C++ program i'm trying to compile, or if there's any difference between the two.
I'm trying to compile the ffmpeg source files (downloaded from here: http://ffmpeg.mplayerhq.hu/ffmpeg-checkout-snapshot.tar.bz2) for a windows platform.
I have Visual C++ 6 and .NET installed on my PC.
I don't know anything about compiling these programs.
How do I compile this program in the command line interface (IDE seems far more complicated at the moment)
Looking forward to your comments.
Andrew
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bugger! Alright i'll give Cygwin a go, how do I use it once it's installed? This is beginning to look like a steep learning curve.
Note: The ffmpeg source has two files that I think may be of use: Makefile and common.mak.
Note: The ffmpeg source has two files that I think may be of use: Makefile and common.mak.
Yes that's a different world, it's even worse if you do not have Unix experience. What you need at least is
automake + autocoinf, gnu make, gcc
the Makefile won't help you much because configure will write quite a few lines in either of them.
It's a really big step. I don't think there are any shortcuts.
- Install cygwin (see that the development tools mentioned above are opened)
- install bash also.
If you have that all installed then open a bash command prompt cd to the ffmpg sources
type
./configure (or maybe /bin/sh configure)
and hope for the best, but be prepared for the worst....
Regards
Friedrich
automake + autocoinf, gnu make, gcc
the Makefile won't help you much because configure will write quite a few lines in either of them.
It's a really big step. I don't think there are any shortcuts.
- Install cygwin (see that the development tools mentioned above are opened)
- install bash also.
If you have that all installed then open a bash command prompt cd to the ffmpg sources
type
./configure (or maybe /bin/sh configure)
and hope for the best, but be prepared for the worst....
Regards
Friedrich
ASKER
I have got a little Unix experience, when you said about "installing the bash command prompt".. That sounds like Unix, I'm trying to compile the program in Windows for Windows (just thought i'd clarify that just incase) :)
ASKER
Ok I'm starting to get the hang of this. I've downloaded Cgywin and included automake, autoconf, and gcc... couldn't find gnu make in the packages list.
So Cgywin is like unix in windows, and I use the tools in here to compile programs. Cool!
Is there a tutorial regarding compiling using these tools...
For example... the command GCC wants an input file, which file? Tried a few and the only one which really did anything was anything with a '.c' extension.
fridom, i've increased the points due to the complexity of this.
So Cgywin is like unix in windows, and I use the tools in here to compile programs. Cool!
Is there a tutorial regarding compiling using these tools...
For example... the command GCC wants an input file, which file? Tried a few and the only one which really did anything was anything with a '.c' extension.
fridom, i've increased the points due to the complexity of this.
You can install make also just start the cygwin installer again search under development tools or th elike and check the make option.
Well a command line tools works like this:
assume you have
hello_world.c
int main(void) {
puts ("Something");
return 0;
}
then you usuayll save this file with a .c extension (well you do not have to but it's standard)
then you call gcc like this:
gcc hello_world.c
and it will generate a file probably called a.exe you can change that with providing the -o command line switch.
But that is not what you should do. As written before install all the needed tools like
automake+autoconf
gcc
make
then go in the ffpmpg subdirectory (with the bash shell because configure is a Shell-Script)
type ./configure --help to see the options usually a
./configure is enough to generate all the needed files
than just type
make
After that the compiliation of the whole stuff begins. Now if you are lucky it will compile without any trouble than there will be some output, in your case probably some shared library.
Maybe there is a test option provided in the Makefile so type
make test
for installation you have to type
make install
then you can try examples but
1) you have to have the proper include pathes set
2) you have to link against the proper library.
Regards
Friedrich
Well a command line tools works like this:
assume you have
hello_world.c
int main(void) {
puts ("Something");
return 0;
}
then you usuayll save this file with a .c extension (well you do not have to but it's standard)
then you call gcc like this:
gcc hello_world.c
and it will generate a file probably called a.exe you can change that with providing the -o command line switch.
But that is not what you should do. As written before install all the needed tools like
automake+autoconf
gcc
make
then go in the ffpmpg subdirectory (with the bash shell because configure is a Shell-Script)
type ./configure --help to see the options usually a
./configure is enough to generate all the needed files
than just type
make
After that the compiliation of the whole stuff begins. Now if you are lucky it will compile without any trouble than there will be some output, in your case probably some shared library.
Maybe there is a test option provided in the Makefile so type
make test
for installation you have to type
make install
then you can try examples but
1) you have to have the proper include pathes set
2) you have to link against the proper library.
Regards
Friedrich
./configure
make
....
If you have trouble with that also you should look for someone doing that job for you, but be prepared it might get expensive.
Regards
Friedrich