tags:

views:

128

answers:

5

Ok. I am trying to compile the following application on Windows (Segmenter, see step 3).

I checked out the source and changed the references so that'd all be good. It's basically a one file app, with a reference to ffmpeg.

The makefile reads:

gcc -Wall -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad

I have the Visual C++ compiler, but I just have no clue how to compile the above line using that compiler, or should I grab Gcc for Windows?

+1  A: 

Unless you have source for the libraries you are linking in, you'll probably have to use the compiler that compiled them.

abc
+2  A: 

Don't consider using cygwin unless the project you are working on absolutely requires it. Download the MinGW version of GCC plus binutils like make from http://tdragon.net/recentgcc. I've never heard of the version of GCCyou provide a link to in your question - MinGW is the mainstream project in this area.

anon
+2  A: 

The line indicates a very simple compile. It's compiling the file with one standard argument (-g for compiling with debug symbols, on MSVC it's /Zi).

But it's linking with a lot of libraries (that's all the -l options). I recognize two of those as standard compression libraries (bz2 and z), so you are going to need to build those libraries first.

R Samuel Klatchko
+1  A: 
cl -c -W4 segmenter.c -Fosegmenter.obj
link segmenter.obj avformat avcodec avutil bz2 faac mp3lame x264 faad 

I'm not sure that to do with -lm and -lz though. In fact, all of these librarys will need to be built by the MSVC compiler for this to work.

John Knoeller
+1  A: 

You should be able to use cl.exe that you already have. You can use /Wall instead of -Wall . (W controls how warnings are generated.)

R Samuel Klatchko gives the rest of what you should need to know.

JeffH