| View previous topic :: View next topic |
| Author |
Message |
Paul Springer Guest
|
Posted: Thu Sep 09, 2004 10:03 am Post subject: MS Visual C++ and .dll files |
|
|
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
|
Posted: Fri Sep 10, 2004 2:27 pm Post subject: Re: MS Visual C++ and .dll files |
|
|
| 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
|
Posted: Sat Sep 18, 2004 7:59 pm Post subject: Re: MS Visual C++ and .dll files |
|
|
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 |
|
 |
|