Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29376 Discussions

Need assistance on slight variation on DLL_Shared_Data example

bmchenry
New Contributor II
591 Views

I have a project where a couple of different routines will access a 'share data' DLL

Basically it has a control routine which calls 2 or 3 routines which each want access to shared data. I was having issues with how to configure and so decided:'lets try some things out' I am running some tests with the sample DLL_Shared_Data and have run into an issue:

In the Sample, 2 'tricks' were used:

1) The 'shared data' DLL was 'saved to the Debug directory of the 'main' project and

2) the 'main' project was simply two copies of the same project.

So if a solution is created which creates some DLL's, one of which is to be 'shared' with the others, how best to configure so they all can link in the 'shared' dll?

So to test out the sample, I have everythign be built in directory c:\\test (so then when adding additional routines this same technique should be useful?)
In the sample, no matter how i seem to configure it, when linking I run into: LNK2019: unresolved external symbol errors.

Any ideas on how to accomplish this?
Thanks
brian

0 Kudos
1 Reply
bmchenry
New Contributor II
591 Views
OK
got it solved.
had to add
c:\test\shared_globals_DLL.lib
to Linker Additional Dependencies

(of course and alsospecifiying c:\temp everywhere!)
i attach a working sample which builds everything in c:\temp
You'll need to create a directory c:\temp for it to wrtie output.
0 Kudos
Reply