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 

MS Visual C++ and .dll files

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Paul Springer
Guest





PostPosted: Thu Sep 09, 2004 10:03 am    Post subject: MS Visual C++ and .dll files Reply with quote



I am trying to build a simple MS Visual C++ project where the main (my
one and only source file in the project - a C file) calls units from a
..dll file. There is a .h file for the .dll file and the .dll file was
created using gnatdll. The library file for the .dll file is included
in the project.

I am getting an execution error (instruction at "0x000272c0"
referenced memory at "0x000272c0". The memory could not be read.) The
only build problem is this linker warning: warning LNK4078: multiple
".text" sections found with different attributes (E0000020).

I have never used a .dll file before and I'm not sure I'm correctly
making it "known" to me project. Where do I put the .dll file? Are
there any dll specific switches or options I need to set? Thanks.

-Paul

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Jan Bares
Guest





PostPosted: Fri Sep 10, 2004 2:27 pm    Post subject: Re: MS Visual C++ and .dll files Reply with quote



Quote:
I am getting an execution error (instruction at "0x000272c0"
referenced memory at "0x000272c0". The memory could not be read.) The

Not too much information for help. Find the exact place of error, post the
code.

Quote:
only build problem is this linker warning: warning LNK4078: multiple
".text" sections found with different attributes (E0000020).

I've never seen this warning, does it appear even if you don't link in the
library?

Regards Jan

PS: I suggest you to direct your questions to msnews.microsoft.com.



[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Matt Gerrans
Guest





PostPosted: Sat Sep 18, 2004 7:59 pm    Post subject: Re: MS Visual C++ and .dll files Reply with quote



What's gnatdll? It may be the lib is not compatible with the MS linker.
In that case, your best recourse may be to have your code load the DLL
dynamically (with LoadLibrary()) and get the functions you want with
GetProcAddress(). It shouldn't be too much trouble, since you have the
header file, telling you all the function prototypes.

- Matt


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) 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.