C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Identifier Not Found

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jul 25, 2006 9:10 am    Post subject: Identifier Not Found Reply with 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
Guest






PostPosted: Tue Jul 25, 2006 9:10 am    Post subject: Re: Identifier Not Found Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.