Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to compile and debug C++ from Vim

I've been learning C++ and Allegro using Code::Blocks on Windows XP, and recently felt like learning Vim. However, I have no idea how to compile a program "manually" (i.e., without using an IDE).

For compiling from within Vim, I have gotten as far as setting the makeprg to gcc, but I understand I also need a makefile. What is that and how do I write one? Is it with the makefile that I can use libraries such as Allegro?

Also, I've gotten quite fond of the CB debugger (I'm using gdb). Is it possible to do something similar with Vim?

Thank you.

like image 632
Caio Avatar asked Mar 17 '09 21:03

Caio


1 Answers

Look at MinGW. I would avoid Cygwin if you only need gcc and make. You'll want both MinGW and MSYS. MSYS has a windows port of make.

If you're interested in more unix utlities for the windows command line I recommend CoreUtils.

For learning make see the manual

like image 125
epochwolf Avatar answered Oct 07 '22 01:10

epochwolf