[AIX] usages of lint for .cpp file?


 
Thread Tools Search this Thread
Operating Systems AIX [AIX] usages of lint for .cpp file?
# 1  
Old 01-13-2009
[AIX] usages of lint for .cpp file?

Hi ,

I Want to apply AIX lint to my source code which all are *.cpp/*.h

>lint test.cpp
lint: 1286-332 File test.cpp must have a .c, .C or .ln extension. It is ignored.
lint: 1286-334 There are no files to process.

I am getting above error.

-Ashok
# 2  
Old 01-13-2009
As far as i know lint is only understanding C-source but not C++-source. Either you wrote a pure C-program using the extension ".cpp", which is perfectly legal as a C++-compiler understands the whole C syntax - in this case rename the source to ".c" - or your source is C++ in nature. In this case lint wont be able to help you i fear.

I hope this helps.

bakunin
# 3  
Old 01-13-2009
Directly rename will give error by C compiler.

I suppose there must be some way.

Or any similar command like 'lint'
# 4  
Old 01-13-2009
My quick research found "FlexeLint for C/C++" from Gimpel Software. Alas it is no free software, but it looks like it might fit your purpose. I have not experience using this tool, though, maybe someone else can filll in here?

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error in compiling .cpp file

I get this error, defaults.cpp: In member function ‘int Defaults::GetIntDefault(const std::string&)’: defaults.cpp:68: error: ‘atoi’ was not declared in this scope defaults.cpp: In member function ‘real_t Defaults::GetRealDefault(const std::string&)’: defaults.cpp:76: error: ‘atof’ was not... (1 Reply)
Discussion started by: bstephens
1 Replies

2. Shell Programming and Scripting

help me for Perl script for tool usages

Hi, How to do Perl script for floating license usages metric. Anyone help me out this issue? Regards, Ram. (0 Replies)
Discussion started by: ramanthan
0 Replies

3. Shell Programming and Scripting

Calling a function in cpp file inside shell script

Hi I need to call a function written in a cpp file with arguments inside the shell script..Can anyone help me how to do this:( (1 Reply)
Discussion started by: rkrish
1 Replies

4. Red Hat

Limit RAM Usages

Is there any kernel tune parameters available to limit RAM usages at certain level . EG . RAM: 4 GB Swap: 2 GB I Need if my RAM usages reached 3 GB Kernel will start swaping new pages . .. --Shirish Shukla (8 Replies)
Discussion started by: Shirishlnx
8 Replies

5. Solaris

How get memory and cpu usages of user's processes?

I have the processes (100+) by the oracle id and I'd to get the summarized view of the oracle processes' usage of the memory and the cpu. top would give me some, but not all. Thanks (3 Replies)
Discussion started by: iwmi
3 Replies

6. Emergency UNIX and Linux Support

Functions defined in header / cpp file behaves different

File: A.h class A { public: struct x X; int show() { x.member_variable ? 0: -1; } }; Now if A.cpp is complied which includes A.h (which is actually in a huge project space) we see that x.member_variable value is not as expected. But if remove the show() method and place... (4 Replies)
Discussion started by: uunniixx
4 Replies

7. Shell Programming and Scripting

want to find out a function name in a cpp file

I have an error in my logs as it shows some function name . 1. I dnt know where is the file.cpp located only i know the machine . 2. How to find out that the function name is loacated in which path and which file into that machine. Thanks . (1 Reply)
Discussion started by: madfox
1 Replies

8. Shell Programming and Scripting

reading a cpp file

I need to find all the methods in a cpp file ... using shell script Pls guide me regarding the grep criteria for searching methods I mean what are the patterns to be grepped in *.cpp which match methods Hope i have made myself clear Thanks and Regards -- Ultimatix (2 Replies)
Discussion started by: ultimatix
2 Replies

9. Shell Programming and Scripting

If file = .cpp then print?

I'm trying to develop a script that makes it so only .cpp programs can print. I'm doing it for my computer programming class because everyone keeps printing the executable instead of the source code and it's wasting a lot of paper. How can I accomplish this? Thanks for the help. :D (5 Replies)
Discussion started by: Irish_Cereal
5 Replies

10. Solaris

Usages of Array's (Important please)

;) Hi friends, any one please help me. I want to store some job names into an array and also I want extract these names on different timings for scheduling. Please give me some idea. your's loving LOVE :p (1 Reply)
Discussion started by: Love
1 Replies
Login or Register to Ask a Question