 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Jul 25, 2006 9:10 am Post subject: Identifier Not Found |
|
|
Hello,
Following is a sample of the code I have:
Inside Directory 'A'
A.lib
---------
A.h
....
void func1(void*);
A.c
#include "A.h"
....
void func1(void* abc){......}
Inside Directory A_New
A_New.DLL
------------------
A.h
#include "rename_functions.h"
....
void __stdcall func1(void*);
A.c
#include "A.h"
....
void __stdcall func1(void* abc){......}
rename_functions.h
#define func1 NEW_func1
Inside Directory 'Code'
Code1.cpp
#include "A.h"
....
void * myfunction(....){
func1(.....);
}
Code2.cpp
#include "../A_New/A.h"
.....
void * myNewfunction(...){
NEW_func1(....);
}
What I am basically doing is using two versions of a library 'A'. One
is being linked statically and the new one is being used as a DLL. I
have a #define file to rename the functions of the new DLL prefixed
with NEW_ so that there are no name conflicts.
I am using Visual C++ .NET 7.1 and I am getting a compiler error
"Identifier not found, even with argument-dependent lookup".
What could possibly be the problem?
Thanks in advance.
Best regards,
B. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jul 25, 2006 9:10 am Post subject: Re: Identifier Not Found |
|
|
Ok. For anyone who needs the answer:
The problem was in the fact that I was #include the old file first and
then #include the new file. In both the .h files (old and new) there
was the #ifdef __A_h__ block. So the new file never used to actually
get included and hence the #defines never used to replace the func1
with NEW_func1. So I changed the #ifdef __A_h__ to #ifdef __A2_h__ and
it worked.
bilaribilari (AT) yahoo (DOT) com wrote:
| Quote: | Hello,
Following is a sample of the code I have:
Inside Directory 'A'
A.lib
---------
A.h
...
void func1(void*);
A.c
#include "A.h"
...
void func1(void* abc){......}
Inside Directory A_New
A_New.DLL
------------------
A.h
#include "rename_functions.h"
...
void __stdcall func1(void*);
A.c
#include "A.h"
...
void __stdcall func1(void* abc){......}
rename_functions.h
#define func1 NEW_func1
Inside Directory 'Code'
Code1.cpp
#include "A.h"
...
void * myfunction(....){
func1(.....);
}
Code2.cpp
#include "../A_New/A.h"
....
void * myNewfunction(...){
NEW_func1(....);
}
What I am basically doing is using two versions of a library 'A'. One
is being linked statically and the new one is being used as a DLL. I
have a #define file to rename the functions of the new DLL prefixed
with NEW_ so that there are no name conflicts.
I am using Visual C++ .NET 7.1 and I am getting a compiler error
"Identifier not found, even with argument-dependent lookup".
What could possibly be the problem?
Thanks in advance.
Best regards,
B. |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|