468,512 Members | 1,512 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

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.

Jul 25 '06 #1
1 14224
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.
bi**********@yahoo.com wrote:
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.
Jul 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Marc Gustafson | last post: by
reply views Thread by kudruu | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.