Getting LIB and Extension DLL into Synch
Robert H. Mowery III -- rmowery@csci.csc.com
Tuesday, November 26, 1996
Environment: VC++ 4.2b, Win 95
This is probably a simple question, but it one of those that I cannot seem
to locate any information in any of the 5 books I looked through, nor on
the knowledge base or MSDev. We are creating Extensions DLL's which work
great. What we want to do now is generate the Debug and the Release
versions with slightly different names so we can put these into a common
directory. Currently when the extension dll's are created we get the
Release and Debug directories that produce the lib and the dll. This works
fine but our DLL's have the same name for example.
\Debug\foobar.lib
\Release\foobar.lib
What we want to end up with is:
\Debug\foobard.lib
\Release\foobar.lib
This allows us to place all the debug and release files in the same common
directory and then our main application that uses all the DLL's just
references those with the "d" on the end for our debug build and the
release build is set to use the others. The main appplication settings are
all just fine and we can get the seperate builds. almost.
The problem is that we cannot change the name of the output file of the DLL
to be different. I have tried changing the settings under the build
settings and even though the MFC DLL compiles and links itself and also the
main applciation can be compiled and linked for debug. The problem occurs
when our Main application is executed, for some reason it is trying to find
foobar.dll instead of foobard.dll.
The exact error is "The Dynamic Link Library foobar.dll cannot be found in
the specified path".
My confusion is that I am only building the debug version and in the
settings for that debug version I am using the foobard.lib to link. The
DLL is also called foobard.dll.
Is there a signature somewhere on the LIB or DLL that requires it to have
the same name for both release and debug versions. I know it is not the
DLL as I have tried other Extension DLL's we have made and get the same
error.
There is only one warning I get when compiling any of our extension DLL's
when I try to apply this mutliple output naming here's the one for foobar:
Creating library Debug/foobard.lib and object Debug/foobard.exp
foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP differs
from output filename "Debug/foobard.dll"; ignoring directive
foobard.dll - 0 error(s), 1 warning(s)
It seems like if I can solve this wanring I will solve my problem, but I
have found nothing anywhere insdicatiing how I synch the EXP up. If
someone can point me in the right direction or to docs I would appreciate
it or maybe this is a pretty stupid oversight on my part. In anycase any
help is appreciated.
Thanks,
Robert Mowery
Robert H. Mowery III -- rmowery@csci.csc.com
Wednesday, November 27, 1996
Well I figured this out. It was my stupidity. The problem was a result of
the fact that the .DEF file specifies the output library file. Even though
the build settings output filename was being changed the one in the .DEF
file was still foobar.dll. Since we are not explicitly exporting anything
in our MFC extension DLL there is acutally no reason to use the .DEF
removing the .DEF file and rebuilding got rid of the warning and thus got
rid of the problems linking to the DLL.
Again this was not doucmented anywhere that I saw, but stumbled across the
solution by curiosity.
Anyway...hopefully this will keep others from the same bonehead mistake.
-Robert
----------
> From: Robert H. Mowery III
> To: mfc-l@netcom.com
> Subject: Getting LIB and Extension DLL into Synch
> Date: Tuesday, November 26, 1996 10:42 AM
>
> Environment: VC++ 4.2b, Win 95
>
> This is probably a simple question, but it one of those that I cannot
seem
> to locate any information in any of the 5 books I looked through, nor on
> the knowledge base or MSDev. We are creating Extensions DLL's which work
> great. What we want to do now is generate the Debug and the Release
> versions with slightly different names so we can put these into a common
> directory. Currently when the extension dll's are created we get the
> Release and Debug directories that produce the lib and the dll. This
works
> fine but our DLL's have the same name for example.
>
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
> What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
> This allows us to place all the debug and release files in the same
common
> directory and then our main application that uses all the DLL's just
> references those with the "d" on the end for our debug build and the
> release build is set to use the others. The main appplication settings
are
> all just fine and we can get the seperate builds. almost.
>
> The problem is that we cannot change the name of the output file of the
DLL
> to be different. I have tried changing the settings under the build
> settings and even though the MFC DLL compiles and links itself and also
the
> main applciation can be compiled and linked for debug. The problem occurs
> when our Main application is executed, for some reason it is trying to
find
> foobar.dll instead of foobard.dll.
>
> The exact error is "The Dynamic Link Library foobar.dll cannot be found
in
> the specified path".
>
> My confusion is that I am only building the debug version and in the
> settings for that debug version I am using the foobard.lib to link. The
> DLL is also called foobard.dll.
> Is there a signature somewhere on the LIB or DLL that requires it to have
> the same name for both release and debug versions. I know it is not the
> DLL as I have tried other Extension DLL's we have made and get the same
> error.
>
> There is only one warning I get when compiling any of our extension DLL's
> when I try to apply this mutliple output naming here's the one for
foobar:
>
> Creating library Debug/foobard.lib and object Debug/foobard.exp
> foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP differs
> from output filename "Debug/foobard.dll"; ignoring directive
> foobard.dll - 0 error(s), 1 warning(s)
>
> It seems like if I can solve this wanring I will solve my problem, but I
> have found nothing anywhere insdicatiing how I synch the EXP up. If
> someone can point me in the right direction or to docs I would appreciate
> it or maybe this is a pretty stupid oversight on my part. In anycase any
> help is appreciated.
>
> Thanks,
>
> Robert Mowery
>
Dmitry A. Dulepov -- dima@samsung.msk.su
Thursday, November 28, 1996
[Mailer: "Groupware E-Mail". Version 1.01.042]
You need to use .DEF files and they must be different for Debug/Rel=
ease versions. LIBRARY statement in .DEF file must be the same as D=
LL name you want to have.
Now you always link to FOOBAR, although output name may be FOOBARD.=
May be you will need to have two project files for Debug/Release b=
ecause I think MSVC will not allow to use different .DEF files for =
different configurations (I can mistake in this).
Dmitry A. Dulepov
Samsung Electronics Co., Ltd.
Russian Research Center
Phone: +7 (095) 213-9207
Fax: +7 (095) 213-9196
E-mail: dima@src.samsung.ru
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-----------------------------
> [From: RobertH.MoweryIII
> [Address: rmowery@csci.csc.com
> [To: Dmitry A. Dulepov
> [Date: Thu Nov 28 06:26:33 1996
>Environment: VC++ 4.2b, Win 95
>
>This is probably a simple question, but it one of those that I can=
not seem
>to locate any information in any of the 5 books I looked through, =
nor on
>the knowledge base or MSDev. We are creating Extensions DLL's whi=
ch work
>great. What we want to do now is generate the Debug and the Relea=
se
>versions with slightly different names so we can put these into a =
common
>directory. Currently when the extension dll's are created we get =
the
>Release and Debug directories that produce the lib and the dll. T=
his works
>fine but our DLL's have the same name for example.
>
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
>What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
>This allows us to place all the debug and release files in the sam=
e common
>directory and then our main application that uses all the DLL's ju=
st
>references those with the "d" on the end for our debug build and t=
he
>release build is set to use the others. The main appplication set=
tings are
>all just fine and we can get the seperate builds. almost.
>
>The problem is that we cannot change the name of the output file o=
f the DLL
>to be different. I have tried changing the settings under the bui=
ld
>settings and even though the MFC DLL compiles and links itself and=
also the
>main applciation can be compiled and linked for debug. The problem=
occurs
>when our Main application is executed, for some reason it is tryin=
g to find
>foobar.dll instead of foobard.dll.
>
>The exact error is "The Dynamic Link Library foobar.dll cannot be =
found in
>the specified path". =
>
>My confusion is that I am only building the debug version and in t=
he
>settings for that debug version I am using the foobard.lib to link=
=2E The
>DLL is also called foobard.dll.
>Is there a signature somewhere on the LIB or DLL that requires it =
to have
>the same name for both release and debug versions. I know it is n=
ot the
>DLL as I have tried other Extension DLL's we have made and get the=
same
>error. =
>
>There is only one warning I get when compiling any of our extensio=
n DLL's
>when I try to apply this mutliple output naming here's the one for=
foobar:
>
> Creating library Debug/foobard.lib and object Debug/foobard.exp
>foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP d=
iffers
>from output filename "Debug/foobard.dll"; ignoring directive
> foobard.dll - 0 error(s), 1 warning(s)
>
>It seems like if I can solve this wanring I will solve my problem,=
but I
>have found nothing anywhere insdicatiing how I synch the EXP up. =
If
>someone can point me in the right direction or to docs I would app=
reciate
>it or maybe this is a pretty stupid oversight on my part. In anyc=
ase any
>help is appreciated.
>
>Thanks, =
>
>Robert Mowery=
Paulo Soares -- psoares@ip.pt
Thursday, November 28, 1996
On Tuesday, November 26, 1996 15:42 PM, Robert H. Mowery =
III[SMTP:rmowery@csci.csc.com] wrote:
>Environment: VC++ 4.2b, Win 95
>
>This is probably a simple question, but it one of those that I cannot =
seem
>to locate any information in any of the 5 books I looked through, nor =
on
>the knowledge base or MSDev. We are creating Extensions DLL's which =
work
>great. What we want to do now is generate the Debug and the Release
>versions with slightly different names so we can put these into a =
common
>directory. Currently when the extension dll's are created we get the
>Release and Debug directories that produce the lib and the dll. This =
works
>fine but our DLL's have the same name for example.
>
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
>What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
>This allows us to place all the debug and release files in the same =
common
>directory and then our main application that uses all the DLL's just
>references those with the "d" on the end for our debug build and the
>release build is set to use the others. The main appplication settings =
are
>all just fine and we can get the seperate builds. almost.
>
>The problem is that we cannot change the name of the output file of the =
DLL
>to be different. I have tried changing the settings under the build
>settings and even though the MFC DLL compiles and links itself and also =
the
>main applciation can be compiled and linked for debug. The problem =
occurs
>when our Main application is executed, for some reason it is trying to =
find
>foobar.dll instead of foobard.dll.
>
>The exact error is "The Dynamic Link Library foobar.dll cannot be found =
in
>the specified path". =20
>
>My confusion is that I am only building the debug version and in the
>settings for that debug version I am using the foobard.lib to link. =
The
>DLL is also called foobard.dll.
>Is there a signature somewhere on the LIB or DLL that requires it to =
have
>the same name for both release and debug versions. I know it is not =
the
>DLL as I have tried other Extension DLL's we have made and get the same
>error.=20
>
>There is only one warning I get when compiling any of our extension =
DLL's
>when I try to apply this mutliple output naming here's the one for =
foobar:
>
> Creating library Debug/foobard.lib and object Debug/foobard.exp
>foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP =
differs
>from output filename "Debug/foobard.dll"; ignoring directive
> foobard.dll - 0 error(s), 1 warning(s)
>
>It seems like if I can solve this wanring I will solve my problem, but =
I
>have found nothing anywhere insdicatiing how I synch the EXP up. If
>someone can point me in the right direction or to docs I would =
appreciate
>it or maybe this is a pretty stupid oversight on my part. In anycase =
any
>help is appreciated.
>
>Thanks,=20
>
>Robert Mowery=20
>
>
>
In the Developer Studio go to the project settingg, link tab, general =
option.
In the "Output file name" put the name and destination of your DLL. Make =
sure that the lib and pdb have the same name as above. Do this for the =
debug and for the release.
That's all. I use this a lot and never fails.
Best Regards,
Paulo Soares
psoares@ip,pt
Stefan Decuypere -- stefand@pre-press-sw.be
Thursday, November 28, 1996
Yes, this took me a while also to figure out:
Open up the .DEF file for you dll project
Change the line LIBRARY FOOBAR.DLL to just LIBRARY
This has the effect that the def file will not try to name the .DLL file
itself, but will let the Build->Settings do it
(This will solve your linker problem)
In a company wide global header file, we have this little code snippet:
#define rsi_source_root "c:\\src\\NT\\"
#ifdef _UNICODE
#ifdef _DEBUG
#define rsi_lib_trailing_string "UD"
#else
#define rsi_lib_trailing_string "U"
#endif
#else
#ifdef _DEBUG
#define rsi_lib_trailing_string "ND"
#else
#define rsi_lib_trailing_string "N"
#endif
#endif
in the header file for the dll, we have this code:
#if !RSI_BUILDING_DLL
// tell the linker what library to link with
// example: c:\src\nt\libs\filenamesUD.lib if compiling for unicode debug
#pragma comment(lib, rsi_source_root "libs\\filenames"
rsi_lib_trailing_string ".lib")
#endif
This has the advantage that we don't have to set the needed dll's in every
project that uses this dll.
(We also have a custom build step that copies the dll and .lib file to
global directories, so we always use the latest version)
Hope this helps.
At 10:42 AM 11/26/96 -0500, you wrote:
>Environment: VC++ 4.2b, Win 95
>
>This is probably a simple question, but it one of those that I cannot seem
>to locate any information in any of the 5 books I looked through, nor on
>the knowledge base or MSDev. We are creating Extensions DLL's which work
>great. What we want to do now is generate the Debug and the Release
>versions with slightly different names so we can put these into a common
>directory. Currently when the extension dll's are created we get the
>Release and Debug directories that produce the lib and the dll. This works
>fine but our DLL's have the same name for example.
>
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
>What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
>This allows us to place all the debug and release files in the same common
>directory and then our main application that uses all the DLL's just
>references those with the "d" on the end for our debug build and the
>release build is set to use the others. The main appplication settings are
>all just fine and we can get the seperate builds. almost.
>
>
stefand@pre-press-sw.be
Stefan F Decuypere PrePress Software
Rendekensstraat 87 9070 Heusden Belgium
Tel +32 9 211 01 01 Fax +32 9 211 01 00
Ash Williams -- ash@digitalworkshop.co.uk
Thursday, November 28, 1996
Robert,
What you want to do is quite reasonable. Modify the following example
as applicable ***
Assume you're writing an extention dll called MyDll.
First go to the Link options in the compiler settings and specify the
following paths:
C:\Win95\System\MyDll_Debug.dll - for the debug path
C:\Win95\System\MyDll_Release.dll - for the release path
Go to the def file and change the library name:
from
LIBRARY "MYDLL"
to
LIBRARY "MYDLL_DEBUG" - for doing a debug build, or
LIBRARY "MYDLL_RELEASE" - for doing a release build
and everything should be okay.
And yes, changing the def file is very annoying between debug and
release builds :(
At the risk of insulting your intelligence make sure you exclude the
correct lib during your client application builds, ie when building a
release application, exclude the debug lib and vice versa.
Ash
Jens Bohlmann -- bohly@ki.comcity.de
Saturday, November 30, 1996
Dmitry,
This is indeed a mistake. You can use diffrent .DEF Files. I fixed the
problem with two .DEF File ( xyz.DEF and xyzD.DEF ) which excluded from
build in the differerent Environments each (Linker Section has to be
updated ( /DEF:xyz.def in Release, /DEF:xyzD.def in Debug).
You can also comment the 'LIBRARY'-Statment out of the .DEF File an use the
same one in both environments.
Jens
----------
From: Dmitry A. Dulepov
To: Robert H. Mowery III
Cc: MFC List
Subject: RE: Getting LIB and Extension DLL into Synch
Date: Thursday, November 28, 1996 9:33 AM
[Mailer: "Groupware E-Mail". Version 1.01.042]
You need to use .DEF files and they must be different for Debug/Release
versions. LIBRARY statement in .DEF file must be the same as DLL name you
want to have.
Now you always link to FOOBAR, although output name may be FOOBARD. May be
you will need to have two project files for Debug/Release because I think
MSVC will not allow to use different .DEF files for different
configurations (I can mistake in this).
Dmitry A. Dulepov
Samsung Electronics Co., Ltd.
Russian Research Center
Phone: +7 (095) 213-9207
Fax: +7 (095) 213-9196
E-mail: dima@src.samsung.ru
====================================
-----------------------------
> [From: RobertH.MoweryIII
> [Address: rmowery@csci.csc.com
> [To: Dmitry A. Dulepov
> [Date: Thu Nov 28 06:26:33 1996
>Environment: VC++ 4.2b, Win 95
>
>This is probably a simple question, but it one of those that I cannot seem
>to locate any information in any of the 5 books I looked through, nor on
>the knowledge base or MSDev. We are creating Extensions DLL's which work
>great. What we want to do now is generate the Debug and the Release
>versions with slightly different names so we can put these into a common
>directory. Currently when the extension dll's are created we get the
>Release and Debug directories that produce the lib and the dll. This
works
>fine but our DLL's have the same name for example.
>
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
>What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
>This allows us to place all the debug and release files in the same common
>directory and then our main application that uses all the DLL's just
>references those with the "d" on the end for our debug build and the
>release build is set to use the others. The main appplication settings
are
>all just fine and we can get the seperate builds. almost.
>
>The problem is that we cannot change the name of the output file of the
DLL
>to be different. I have tried changing the settings under the build
>settings and even though the MFC DLL compiles and links itself and also
the
>main applciation can be compiled and linked for debug. The problem occurs
>when our Main application is executed, for some reason it is trying to
find
>foobar.dll instead of foobard.dll.
>
>The exact error is "The Dynamic Link Library foobar.dll cannot be found in
>the specified path".
>
>My confusion is that I am only building the debug version and in the
>settings for that debug version I am using the foobard.lib to link. The
>DLL is also called foobard.dll.
>Is there a signature somewhere on the LIB or DLL that requires it to have
>the same name for both release and debug versions. I know it is not the
>DLL as I have tried other Extension DLL's we have made and get the same
>error.
>
>There is only one warning I get when compiling any of our extension DLL's
>when I try to apply this mutliple output naming here's the one for foobar:
>
> Creating library Debug/foobard.lib and object Debug/foobard.exp
>foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP differs
>from output filename "Debug/foobard.dll"; ignoring directive
> foobard.dll - 0 error(s), 1 warning(s)
>
>It seems like if I can solve this wanring I will solve my problem, but I
>have found nothing anywhere insdicatiing how I synch the EXP up. If
>someone can point me in the right direction or to docs I would appreciate
>it or maybe this is a pretty stupid oversight on my part. In anycase any
>help is appreciated.
>
>Thanks,
>
>Robert Mowery
----------
Joe willmann -- joew@mdhost.cse.tek.com
Monday, December 02, 1996
At 10:42 AM 11/26/96 -0500, you wrote:
>Environment: VC++ 4.2b, Win 95
>
>This is probably a simple question, but it one of those that I cannot seem
>to locate any information in any of the 5 books I looked through, nor on
>the knowledge base or MSDev. We are creating Extensions DLL's which work
>great. What we want to do now is generate the Debug and the Release
>versions with slightly different names so we can put these into a common
>directory. Currently when the extension dll's are created we get the
>Release and Debug directories that produce the lib and the dll. This works
>fine but our DLL's have the same name for example.
>
The secret is to have two .def files, one for debug and one for release.
When you add the second one to the project MSDEV will complain but do it
anyway. It causes no problems. In the second .def change the name to
reflect the 'd' added to the extension. Then select project settings and
change the out and the def file names manually.
We do this a lot.
Joe Willmann
My opinions are my own, not Tektronix, or anyone elses for that matter!
Ray Davis -- WRD2@ix.netcom.com
Monday, December 02, 1996
Robert H. Mowery III wrote:
>
> Environment: VC++ 4.2b, Win 95
>
> This is probably a simple question, but it one of those that I cannot seem
> to locate any information in any of the 5 books I looked through, nor on
> the knowledge base or MSDev. We are creating Extensions DLL's which work
> great. What we want to do now is generate the Debug and the Release
> versions with slightly different names so we can put these into a common
> directory. Currently when the extension dll's are created we get the
> Release and Debug directories that produce the lib and the dll. This works
> fine but our DLL's have the same name for example.
>
> \Debug\foobar.lib
> \Release\foobar.lib
>
> What we want to end up with is:
> \Debug\foobard.lib
> \Release\foobar.lib
>
> This allows us to place all the debug and release files in the same common
> directory and then our main application that uses all the DLL's just
> references those with the "d" on the end for our debug build and the
> release build is set to use the others. The main appplication settings are
> all just fine and we can get the seperate builds. almost.
>
> The problem is that we cannot change the name of the output file of the DLL
> to be different. I have tried changing the settings under the build
> settings and even though the MFC DLL compiles and links itself and also the
> main applciation can be compiled and linked for debug. The problem occurs
> when our Main application is executed, for some reason it is trying to find
> foobar.dll instead of foobard.dll.
>
> The exact error is "The Dynamic Link Library foobar.dll cannot be found in
> the specified path".
>
> My confusion is that I am only building the debug version and in the
> settings for that debug version I am using the foobard.lib to link. The
> DLL is also called foobard.dll.
> Is there a signature somewhere on the LIB or DLL that requires it to have
> the same name for both release and debug versions. I know it is not the
> DLL as I have tried other Extension DLL's we have made and get the same
> error.
>
> There is only one warning I get when compiling any of our extension DLL's
> when I try to apply this mutliple output naming here's the one for foobar:
>
> Creating library Debug/foobard.lib and object Debug/foobard.exp
> foobard.exp : warning LNK4070: /OUT:FOOBAR.dll directive in .EXP differs
> from output filename "Debug/foobard.dll"; ignoring directive
> foobard.dll - 0 error(s), 1 warning(s)
>
> It seems like if I can solve this wanring I will solve my problem, but I
> have found nothing anywhere insdicatiing how I synch the EXP up. If
> someone can point me in the right direction or to docs I would appreciate
> it or maybe this is a pretty stupid oversight on my part. In anycase any
> help is appreciated.
>
> Thanks,
>
> Robert Mowery
We have them same kind of structure for our releases since we must
release debug versions.
This was a 3 step process
1) Rreference the exact library you wish to link with foobar(d).lib
depending upon which version is being compiled. From the above I
believe you are doing such.
2) Use the __declspec macro to flag to the compiler what
classes/functions are being exported/imported from/to your library.
3) After this the EXP file is no longer necessary and can be deleted.
In our case it got in the way since we generate no code on Errors (We
treat warnings as Errors).
Hope that helps!
Ray - WRD2@IX.NETCOM.COM
Ken -- goersk@fs.com
Wednesday, December 04, 1996
[Mini-digest: 2 responses]
>
>>Environment: VC++ 4.2b, Win 95
>>
>>This is probably a simple question, but it one of those that I
cannot seem
>>to locate any information in any of the 5 books I looked through,
nor on
>>the knowledge base or MSDev. We are creating Extensions DLL's which
work
>>great. What we want to do now is generate the Debug and the
Release
>>versions with slightly different names so we can put these into a
common
>>directory. Currently when the extension dll's are created we get
the
>>Release and Debug directories that produce the lib and the dll.
This works
>>fine but our DLL's have the same name for example.
>>
>The secret is to have two .def files, one for debug and one for
release.
>When you add the second one to the project MSDEV will complain but do
it
>anyway. It causes no problems. In the second .def change the name
to
>reflect the 'd' added to the extension. Then select project
settings
>and
>change the out and the def file names manually.
>We do this a lot.
You can change the output names of the DLL with the /out: link option
and
the library with the /IMPLIB: but you have to make sure your LIBRARY
directive
in the .def file is commented out so it used the output name instead
of the
name specified in the .def file. If you don't you get linker warnings
and strange
debugging problems when you have different file names for /out: and
the
LIBRARY directive.
I've done this to put a project with 5 DLLs and place the output in
Lib and Bin directories.
Here's the linker options from the Link tab and the project options,
just add what you need,
this is the Debug target:
/nologo /subsystem:windows /dll /incremental:yes
/pdb:"KXTab\Debug\KXTab.pdb" /debug /machine:I386
/def:".\KXTab\KXTab.def" /out:"Bin\KXTabD.dll"
/implib:"Lib\KXTabD.lib"
Release target:
/nologo /subsystem:windows /dll /incremental:no
/pdb:"KXTab\Release/KXTab.pdb" /machine:I386
/def:".\KXTab\KXTab.def" /out:"Bin\KXTab.dll" /implib:"Lib\KXTab.lib"
Note that you have to select the release and debug projects separately
and modify their flags separately.
_ Kenny. (keng@logicontech.com)
----------
-----From: Michael Schneider
Joe willmann wrote:
>
> At 10:42 AM 11/26/96 -0500, you wrote:
> >Environment: VC++ 4.2b, Win 95
> >
> >This is probably a simple question, but it one of those that I cannot seem
> >to locate any information in any of the 5 books I looked through, nor on
> >the knowledge base or MSDev. We are creating Extensions DLL's which work
> >great. What we want to do now is generate the Debug and the Release
> >versions with slightly different names so we can put these into a common
> >directory. Currently when the extension dll's are created we get the
> >Release and Debug directories that produce the lib and the dll. This works
> >fine but our DLL's have the same name for example.
> >
>
> The secret is to have two .def files, one for debug and one for release.
> When you add the second one to the project MSDEV will complain but do it
> anyway. It causes no problems. In the second .def change the name to
> reflect the 'd' added to the extension. Then select project settings and
> change the out and the def file names manually.
>
> We do this a lot.
>
> Joe Willmann
> My opinions are my own, not Tektronix, or anyone elses for that matter!
There's an easier solution to this problem. Just remove the name of the
dll
from the library statement in the definition file:
Change
LIBRARY MyDll
To
LIBRARY
That's all. It works fine.
Mike
===================================================
Michael Schneider
Pirckheimer Weg 13
91058 Erlangen
Germany
Phone: ++49 9131 771539
E-Mail: Mike.Schneider@fim.uni-erlangen.de
Mike.Schneider@t-online.de
WWW: http://home.t-online.de/home/Mike.Schneider
===================================================
| Вернуться в корень Архива
|