[Tfug] CentOS vs Ubuntu

John Hubbard ender8282 at yahoo.com
Mon Aug 9 17:30:13 MST 2010


At home I use Ubuntu or some flavor there of.  At work we use CentOS.  I 
was looking at getting the software that I am writing at work run on my 
Ubuntu machine (it would make telecommuting easier).  All of the java 
code just complied and ran, but I have been having problems getting the 
C++ to compile and Google hasn't been giving me a whole lot.  For the 
record Ubuntu (10.04) is using g++ 4.4.3 and CentOS (5.?) is using 4.1.2.

Unless I add a "#include <stdint.h>" Ubuntu's compiler complains about 
not knowing what an "int64_t" is.  Any guess why CentOS doesn't need the 
include and Ubuntu does?

The Ubuntu compiler complains that "free" (as in the opposite of malloc) 
wasn't declared in this scope. I thought the c++ was backwards 
compatible with C and that free should be recognized.

So here are my questions.  Any guesses what I need to include to get 
"free"?  Other than the obvious "the compilers are different", why am I 
seeing these compiler errors?  Is Ubuntu's g++ more restrictive and 
eventually CentOS's will give the same warnings, or is there some other 
difference?

-- 
-john

To be or not to be, that is the question
                 2b || !2b
(0b10)*(0b1100010) || !(0b10)*(0b1100010)
         0b11000100 || !0b11000100
         0b11000100 || 0b00111011
                0b11111111
         255, that is the answer.






More information about the tfug mailing list