Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339358 - Doesn't link functions in a namespace but does link to function decalered as class' static
Summary: Doesn't link functions in a namespace but does link to function decalered as ...
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 09:31 EST by vadim CLA
Modified: 2011-03-11 11:49 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vadim CLA 2011-03-09 09:31:40 EST
Build Identifier: M20100211-1343

include file contains this:
namespace vm
{
void my_classless_function (void);
class some_class
 {
 static void my_class_function (void);
 }
};

cpp file contains this:
using namespace vm;

void some_function (void)
{
some_class::my_class_function();
my_classless_function();   // generates "undefined reference to vm::my_classless_function()" error
}

Reproducible: Always
Comment 1 vadim CLA 2011-03-09 09:33:24 EST
linking to static library
Comment 2 Andrew Gvozdev CLA 2011-03-09 10:20:15 EST
Do you get the error as the result of compilation (i.e. in build console)?
Comment 3 vadim CLA 2011-03-11 11:06:55 EST
Yes
Comment 4 Andrew Gvozdev CLA 2011-03-11 11:49:08 EST
It's compiler complaining about an error in your code. It has nothing to do with CDT.