FreeBSD C++ development

Currently I have the program working in Ubuntu, written in C++. I use Eclipse CDT and GCC compiler for the program build. I need to build this program in the FreeBSD OS. What are my options?
Are GCC and Eclipse CDT available for FreeBSD? If not, what C++ development tools are used in this OS?
Is it possible to use my existing source files and makefiles developed in Ubuntu to build the program in FreeBSD from the command line?
 
AlexF said:
Are GCC and Eclipse CDT available for FreeBSD?
GCC is part of the base OS. And eclipse can be installed as a port: java/eclipse.

Is it possible to use my existing source files and makefiles developed in Ubuntu to build the program in FreeBSD from the command line?
Yes, but wether or not it builds or runs correctly depends entirely on your source code.
 
One thing to watch out for when compiling Linux-friendly C/C++ programs that use Makefiles is as follows. On Linux, the ``make'' command is called GNU make. On FreeBSD, when you run ``make'', it's not GNU make. It's actually quite different. Generally, Makefiles that FreeBSD understands will execute fine with GNU make, but not vice versa (at least not all the time). Therefore, if you are having make-related problems when compiling Linux-friendly programs, and if you're using make from the command-line, I would suggest installing GNU make on FreeBSD, which is the port devel/gmake. You'd call ``gmake'' on FreeBSD instead of ``make'' to invoke GNU make.
 
rambetter said:
One thing to watch out for when compiling Linux-friendly C/C++ programs that use Makefiles is as follows. On Linux, the ``make'' command is called GNU make. On FreeBSD, when you run ``make'', it's not GNU make. It's actually quite different. Generally, Makefiles that FreeBSD understands will execute fine with GNU make, but not vice versa (at least not all the time). Therefore, if you are having make-related problems when compiling Linux-friendly programs, and if you're using make from the command-line, I would suggest installing GNU make on FreeBSD, which is the port devel/gmake. You'd call ``gmake'' on FreeBSD instead of ``make'' to invoke GNU make.

BSD make is commonly referred to as pmake (parallel make); since make also has POSIX paradigms there are some idioms common to gmake and pmake, but apart from basic goal / target definitions, basic variable definitions, and target -> dependency ordering and definitions, they're completely different animals.
 
Back
Top