Linking to static library

I have built a static library that contains a macro. From a separate exe, I am calling this macro, but it doesn't work.

The compilation of the static library and that of the exe went okay.

Static lib contains just the macro definition.

Exe contains call to this macro.

Is there anything else that I need to do for this to work?

Thanks!
Macros are not link time symbols. A macro can be neither exported by a library nor imported by a program.
You can only use a macro by including the file that defines it.
Macros are preprocessor items, they are processed befor ethe compiler even sees the source code.

think of them as text replace in source code because thats what they are.

here's a silly example to demonstrate;

1
2
3
4
5
6
7
#define { BEGIN
#define } END

while (true)
BEGIN
   cout << "in the loop";
END
The oposite Jaybob666, #define BEGIN {, #define END }
@iQChange,

oops a daisy!
Topic archived. No new replies allowed.