N
Neo
Hi,
I have a class structure like this-
//foo.h
class foo {
class_a *ac;
class_b *bc;
---
---
};
I am compiling the above class and its subclasses as a library and
statically linking it at compile time.
Now I have this -
//network.cpp
#include "foo_init.h"
network::network() {
---
init_foo();
}
network::init_foo() {
my foo = new foo(); ***
---
}
where
//foo_init.h
#include foo.h
foo* my_foo;
---
read();
write();
---
I have path to library and source files all set but when I compile the
above setup I get undefined symbol for *** call even though I am
linking that library. What could be wrong?
Thanks,
Neo
I have a class structure like this-
//foo.h
class foo {
class_a *ac;
class_b *bc;
---
---
};
I am compiling the above class and its subclasses as a library and
statically linking it at compile time.
Now I have this -
//network.cpp
#include "foo_init.h"
network::network() {
---
init_foo();
}
network::init_foo() {
my foo = new foo(); ***
---
}
where
//foo_init.h
#include foo.h
foo* my_foo;
---
read();
write();
---
I have path to library and source files all set but when I compile the
above setup I get undefined symbol for *** call even though I am
linking that library. What could be wrong?
Thanks,
Neo