|
I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug.
As part of the output a .lib is also created which is needed by the application trying to use the library.
I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi
Engineering is the effort !
|
|
|
|
|
act_x wrote: Now does it matter for the .lib file ( for linkage) if this is debug or release .
Yes. Use the debug version of the .lib for the debug .dll, and the same goes for the release versions. Don't mix and match the two unless you want some strange errors creeping up.
|
|
|
|
|
Also you should get into the habit of appending (post fixing) a letter 'd' at the end of the debug lib filename to distinguish it from the release version. i.e
release name: utils.lib
debug name: utilsd.lib
---
Yours Truly, The One and Only!
web: devmentor.org
Design, Code, Test, Debug
|
|
|
|
|
also, in the properties tab, there is a macro $(ConfigurationName) it will associate debug files for debug build and release files for release. checkout the different macros, they can help a lot with different configurations or different file paths for different configurations.
[Insert Witty Sig Here]
|
|
|
|
|
I'm dumping values from an array to a file,
like
<br />
typedef int** _2dArray;<br />
_2dArray pIntArray[10];<br />
I can traverse through all the pointers in 'pIntArray' and make a call like
<br />
loop<br />
{<br />
fwrite((void*)&pIntArray,sizeof..,fp);<br />
}<br />
this will write down all the values every pointer in pIntArray is pointing too.
That's fine.
I had to include some more values while dumping these integers. Without thinking about it twice, I implemented a struct all accross like,
<br />
struct mystruct<br />
{<br />
int myval1;<br />
int myval2;<br />
_2dArray* arr2D;<br />
}<br />
mystruct myst;<br />
myst.myval1 =10;<br />
myst.myval2 =20;<br />
myst.arr2D = [another-pointer-to-intpointers.]<br />
And made a stupid implementation like,
<br />
fwrite((void*)&myst,sizeof..,fp);<br />
Crap! This wont work cuz it's a pointer! it wouldn't be dumped with it's content. .. can someone help me out to get away with this design and still manage to dump it's content? sounds stupid, ok tell me what'd be your way to implement it? But please note, with a single stretch, I should be able to fetch all these values with an fread()
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: But please note, with a single stretch, I should be able to fetch all these values with an fread()
There's no way I know of for getting around it. arr2D can't be a pointer when its time to serialize.
VuNic wrote: Jemmy
That my new nickname?
|
|
|
|
|
Jeremy Falcon wrote: That my new nickname?
Mine is Mary apparently
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Mine is Mary apparently
|
|
|
|
|
I thought of putting you as "Maakie"
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
No, that's my friend's name. Who lives in the US, and has a bird's name as his family name.
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: No, that's my friend's name. Who lives in the US, and has a bird's name as his family name.
I've heard of that guy before. I hear he's a PITA.
|
|
|
|
|
Jeremy Falcon wrote:
I've heard of that guy before. I hear he's a PITA.
Exactly
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: Exactly
|
|
|
|
|
hope that he never reads you here ! ;P lol
|
|
|
|
|
VuNic wrote: fwrite((void*)&myst,sizeof..,fp);
Did you mean to do something like this:
fwrite((void *) &myst.arr2D, sizeof(), fp);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Just redesigned the implementation:
<br />
code was here. <br />
Works fine David, Please have a look at it once and kindly point out the mistakes if I've done somewhere. You may ignore the coding conventions, this is just a sample I made.
-- modified at 15:34 Tuesday 25th September, 2007
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
Hello,
I'm using structure to be save data. I now how I pleased data into the struct. but I can't delete them by run time. How can I delete the data from de struct.
This is the code :
Struct Display :
{
char Regel[10][24];
char UnitName[30];
int Count;
}
I put data into this struct on run time, no problem. But I can't delete the data on runtime. It create a fould.
Can sombody help me.
Jelle.
|
|
|
|
|
sorry. i really can't undertand anything in your question.
if you're using an automatic translator, definitely forget to use it...
So, what exactly are you trying to do here, and what's your problem ??
|
|
|
|
|
Jelle De Vos wrote: But I can't delete the data on runtime.
Are you referring to memset() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
memset should do the job perfect. Didn't you try that?
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
thanks,
the memset works goed.
Jelle.
|
|
|
|
|
You may also like to do it:
Create it in heap. Delete it.
<br />
Display* pDisp = new Display;<br />
pDisp->Count=10;<br />
delete pDisp;<br />
Jemmy : Deadline? Pfft, a real programmer eats deadlines for breakfast. :P
Mark: I thought real programmers ignored deadlines
Best wishes to Rexx[^]
|
|
|
|
|
If you have an object of type Display, then any data in the Display object
will be deleted when the object is destroyed, either automatically by
going out of scope (for automatic variables) or by freeing a dynamically
allocated object.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I want the project to execute in the system where VC++ is not installed.When i tried to execute my project in 2 systems where there is no VC++, in one system it worked with or without dlls( MFC42D.dll,MFCO42D.dll, MSVCRTD.dll)but in another system first dialog box opens, when i press "ok button" in that dialog box it has to close current dialog box and open next dialog box but the user interface is closing without showing any error.
Help me to know why it is happening.Project is working fine in the system where VC++ is loaded.
Thanks
|
|
|
|