|
Iain Clarke wrote:
You are right that he would need to distribute B.LIB along with B.DLL if he wanted
an end user to link to the DLL, but that is (I believe) a different question.
I covered both cases since I wasn't very sure about his question.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
First of all, thanks for all the 'activity' being generated on this thread!
Well I agree with you Ian, that is exactly my understanding. (the understanding that A.lib **need not**be shipped when shipping B.dll.
But thats not the way it is working out currently. I have done exactly that.
I am conscious of the fact that the size of the dll (B.dll) swells when I statically link A.lib with it.
However, when using it in an application, the MSVC compiler generates LNK2001 errors (symbol not found) for all of the functions in the static library!!
(I guess you might be skeptic of some settings in my compiler; but trust me it is plain code!)
Thanks for help again. (Btw,please respond to this question)
|
|
|
|
|
richiehere wrote:
First of all, thanks for all the 'activity' being generated on this thread!
You're welcome. It beats real work (which I should be doing...) and is more satisfying
than answering the "please do all my (home)work for me" questions that have been
reappearing.
I'll make an assumption that you have two projects in your workspace. B.DLL subproject,
and C.EXE project that depends on the DLL.
I would *strongly* suspect you are exposing A.LIB to to C.EXE, so it ends up linking
to A.LIB too. Make sure that the exe does not include any of the headers associated
with A.LIB, even implicitly.
I'd bet you have a B.H file with the definitions from B.DLL that includes A.H. If B.H
exposes any functions / classes that are not fully implemented in B.DLL, than C.EXE
will need to link them from somewhere, or it will give errors...
Its hard to be more specific without actually seeing your projects, so I'm having to
be general here.
Iain.
|
|
|
|
|
No, you don't need to distribute A.lib .
The library is needed by the linker to work out how to implement the calls to functions inside the DLL. It is not needed to use D.dll , and therefore doesn't need to be distributed.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
This is what richiehere wrote:
"I was quite aware that while shipping the 'exe', I dont need to ship the lib file.
My specific query was regarding shipping of the static library while shipping the dll."
Therefore, I told him that the library file is needed by the linker, but a developer can also use LoadLibrary (as you know, little bit more work is required).
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Aaah yes, but was he shipping the library so that other developers could use it, or was it part of his application that he didn't want other people to use?
He didn't state this in the question. The most common situation these days is to ship a proprietary DLL as part of an application, so this is what I answered . Your reply is perfectly valid though
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I've posted a reply to Toni78 which you should read[^].
Iain.
|
|
|
|
|
I have a dialog that I am going to transfer data from. When I have all of the edit boxes up and I run - no problem.
When I add up to 10 member variables (double and int total equal 10) I have no problem.
When I go past that small number of member variables I get this error?
MYSOURCE caused an invalid page fault in<br />
module KERNEL32.DLL at 0167:bff766bc.<br />
Registers:<br />
EAX=00550028 CS=0167 EIP=bff766bc EFLGS=00210246<br />
EBX=00000001 SS=016f ESP=00550000 EBP=00550010<br />
ECX=00550110 DS=016f ESI=817df560 FS=328f<br />
EDX=0055045c ES=016f EDI=00550028 GS=0000<br />
Bytes at CS:EIP:<br />
e8 13 ad ff ff 8b 55 08 8f 82 b0 00 00 00 8b 4d <br />
Stack dump:<br />
002a0014 00000000 00550028 00000000 005500f8 bff76733 00550028 005500f8 00000004 00550194 ffffffff 00000000 00000000 00000000 00000000 00000000
Right now, when I am setting the member variable and doing nothing else I get this error. Pushing the button the main dialog causes this window in question to popup. Then closing this window makes a list ctrl fill up in the main window. When the error takes place it looks like the list ctrl is trying to load, but it gives me the erroe before any data is on the screen?
Any suggestions are welcome!
I wish I could type better ...
|
|
|
|
|
I am kind of confused, so here are a few questions:
Are you able to pinpoint the exact line in your source code that leads you this error? (that would really help)
When you say that you cannot have more than 10 member variables, do you mean that you can have more than 10 edit controls on your dialog box but you can assign variables to only 10 of them?
To me is sounds more like you are trying to access something that you haven't initialized yet. A common error, is trying to read or send data to a control of a window that hasn't been created yet.
And finally (even though this doesn't seem to be the problem in your case) if you have visual studio 6.0 installed, make sure you have SP5 installed as well.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
For some reason the wizard wasn't defining the type of variables? Anyway, I put them in by hand and it works now. Thanks
I wish I could type better ...
|
|
|
|
|
You don't have to thank me. I didn't really get to help you.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I think like Toni78 (e.g. example of source code, assign variables)
I think the edit boxes aren't the problem, because in the past i have programmed a dialog with more than 100 edit boxes ... and Win95, Win98, WinME can support a maximum of 16.364 window handles. Other operating systems (NT4, 2000, XP) can support more.
Regards Frank
|
|
|
|
|
how do i plot the values i accpet in the dialog box on the view.i want to plot a point at the coordinates that i accpet from the dialog box.
i donno VC++ so please help!
Every problem has a solution!
|
|
|
|
|
In your dialog create a Data Map to exchange data from your dialog to your dialog class (if you use the app wizard this is done automatically, otherwize you should implement the DoDataExchange() method).
after doing that, derive your view class from CView and override OnPaint(). In the OnPaint, use pDC->MoveTo() and pDC->LineT0() to move around and draw lines.
good luck!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
sir,
i m at msc.final sem, an intrested dev & des a mpeg1 player. i made one by using directshow. i need 2 sep A/V & extract indv frames. how can i? plz send me som src code, becaz i m a newbe for directx. i need to subm this at my col as an assi. i m very much abt that. plz help me.
Ram
|
|
|
|
|
Hi All,
I am new to this site. And need help badly.
I want to Create and access Database(MSAccess) from Windows programming. Can someone please direct me .
Thanks
Valli
|
|
|
|
|
|
PJ Arends
Thank you soo much for your help.
Regards
Valli
|
|
|
|
|
Hi
I just switched from Visual C++ 6 to Visual C++ .NET and converted my old project (.dws) to a solution. Now, when I try to compile my program I get compiler errors I didn't get under VC++6:
CStringArray status;
status.Add("test");
...
cbei.pszText = status.GetAt(0).GetBuffer();
error:
error C2663: 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer
with
[
BaseType=char,
t_bMFCDLL=true
]
what does that mean?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
What is cbei.pszText?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
It's a COMBOBOXEXITEM struct.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Call GetBuffer(0) which will give you a non-const pointer to whatever the current contents of the string are.
--Mike--
"Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today.
-- Joel Spolsky
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
I still get the same error. I can't understand what an error regarding 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer has to do in context of a simple CStringArray
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How do i get a handle to the child edit window that currently has the focus (in another app)?
Kuniva
--------------------------------------------
|
|
|
|
|
GetForegroundWindow() should work for most controls.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|