Click here to Skip to main content
15,919,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


All the function in my program is returning a NULL value after renaming all the .cpp file to .cc. This issue is only seen in Linux, but is working completely fine on Android platform.

Error: 

cp .libs/libtalkapp.la ../Platform/linux/lib/.libs/
cp: cannot create regular file `../Platform/linux/lib/.libs/': Is a directory
make[2]: *** [all] Error 1


Any help would be really helpful.

Thanks in advance,

Faez
Posted
Updated 4-Apr-12 1:52am
v3

1 solution

The error message given above seems to be unrelated to the problem you describe.

Regarding the problem that functions appear to return NULL values: Sometimes compilers derive from the file type whether the given file is in C or C++, which makes a big difference regarding the function signatures. Perhaps that is what causes the problem.
 
Share this answer
 
Comments
Charmy from bangalore 4-Apr-12 9:03am    
tried dat...doesnt work. :(
nv3 4-Apr-12 9:06am    
Can you show a code example of a function returning NULL and specify

- how did you call it?
- was it a library function?
- how did you verify that it returned NULL?
Charmy from bangalore 4-Apr-12 9:18am    
This is the function declaration.
virtual abc* add() const { return add_; }

Here add_ contains a value.

This add is called here.And here the value of add() is 0.
std::string id = add()->test();
Charmy from bangalore 4-Apr-12 9:18am    
no,its not a library function.
nv3 4-Apr-12 10:01am    
So add() is a virtual function of some class and add_ is a member of that class. But then you cannot call add() in the way you did. You must apply it to some class object, e.g. addObj.add(). Did you just leave that out of the code in your last message?

Another possibility is that member add_ is indeed 0. Can you set a breakpoint with your debugger at this spot?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900