|
Hey ppl,
I have create a static library project and build it successfully on debug mode and release mode.
Now I have a different project which uses this static library with
#paragma comment (lib, mylib)
When I compile and run my project in debug mode it runs successfully.
When I compile my project in release mode it compiles successfully but wont run. And when I try to run release mode inside Visual Studio it gives me these errors:
Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
Error 2 fatal error C1083: Cannot open source file: '.\XTexture.cpp': No such file or directory c1xx
Error 3 fatal error C1083: Cannot open source file: '.\XTextBox.cpp': No such file or directory c1xx
Error 4 fatal error C1083: Cannot open source file: '.\XText.cpp': No such file or directory c1xx
Error 5 fatal error C1083: Cannot open source file: '.\XPen.cpp': No such file or directory c1xx
... list goes on.
These files are included in mylib.lib that's why I used static lib. So why this happens?
One more thing, my library's file size in debug mode is 3.103Kb and in release mode 11.349Kb. I expect it would be more less in relase mode..
Thank you...
|
|
|
|
|
dehseth wrote: When I compile my project in release mode it compiles successfully but wont run. D'Oh! And when I try to run release mode inside Visual Studio it gives me these errors:
What do you mean by "Run" ? These errors are compilation errors, you can't have those when you run your program
dehseth wrote: Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
What is "c1xx" at the end ?
Those files which give errors (XWindow.cpp, XTexture.cpp, ...), are they part of your exe or part of your static lib ?
|
|
|
|
|
Application compiles and link successfully:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
But when I double click to generated exe file it crashed So I open visual studio window and press Run button and it gives me these errors I do not get why I get em. There's no c1xx file...
Should I do anything more than putting #pragma comment (lib, "mylib") and include the main header file to make it run on release mode?
|
|
|
|
|
I just delete all Temp files Debug Output files and Release output files. Rebuild library. And rebuil application. Now it runs..
Sometimes we need housekeeping i guess..
|
|
|
|
|
hi every one
How can i create object of a class with protected constructor?
i dont want drived it from base class.
is it possible using friend class?
Plz Help me
|
|
|
|
|
Yes.
Eg:
class base
{
protected :
base()
{
}
friend ami;
};
class ami
{
public:
base obj;
};
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
|
|
|
|
|
i test it but i get this error:
error C2248: 'CAsynlstn::CAsynlstn' : cannot access private member declared in class 'CAsynlstn' [path]: see declaration of 'CAsynlstn::CAsynlstn'
class CMyCtrl : public COleControl
{
private:
friend class CAsynlstn;
CMyCtrl();
~CMyCtrl();
}
class CAsynlstn : public CAsyncSocket
{
private:
CAsynlstn(COleControl* pDlg);
virtual ~CAsynlstn();
};
public:
CAsynSvSk* m_pSrvrSock;
m_pLstnSock = new CAsynlstn(this)
|
|
|
|
|
class CAsynlstn : public CAsyncSocket
{
private:
public:
CAsynlstn(COleControl* pDlg);
virtual ~CAsynlstn();
}
m_pLstnSock = new CAsynlstn(this);
If you are creating object straight like this it has to be public.
btw, what are you trying to do with this?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
A public static method in the class can be used to create the object of the class.
The caller can then use the static method to create an object of the class.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
can you give me an example?
|
|
|
|
|
|
|
|
I wish someone here could help you out, but I suggest you not to *magnify* your question. Remove all those bold style and post a neat question. An example:
Hi Friends,
I have a top level window. I need to show background magnified contents into the window. [Explain a bit more here]
My approach:
I created the desktop bitmap on application startup i.e. m_hbitmapScreenShot.
I created a WS_POPUP window; on each mouse move call i move the window by specified offset calling MoveWindow API and draw the new location contnets into it.
CDC* pDC = GetDC();
CRect rc;
GetClientRect(&ec);
::StretchBlt(pDC->;m_hDC, 0, 0, rc.Width(), rc.Height(), m_hMemDC, nDesX, nDesY, m_nGlassSize /m_nZoomLevel,
m_nGlassSize / m_nZoomLevel, SRCCOPY);
I have two issues
1) When I move the window the background window is not painted at once; so my window traces remains at old location for a while.
2) How to capture background window bitmap when my window is up; I dont need my window in screen shot.
Also, The Other magnified glass disappears as left mouse button is up.
But I need to show it always.
I am attaching screen shot "Magnify.JPG" for your reference.
"Magnify.JPG" location
http://picasaweb.google.com/Smadhukar2000/MFC#5308114585517259826[^]
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
First of all, I agree with VuNic, please don't "run into the room and start yelling 'Look at me, look at me'", using the bolds will just get people upset around here.
And for your problem, try using a Layered window[^] for your "magnifying glass". If you get the desktop DC and use StretchBlt to blit from it you should see that your layered window over the desktop is not in the capture. But note that this works for all layered windows so your screen capture will not show ANY layered windows, not just your own.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hello friends:
I want to capture a minimized window in win2000.I search google and many developer use the "printwindow" function to do it.But the problem is that I use win2000 and VC++6. How to do it? I try to copy winspool.dll and user32.dll to win2000 from windowsXP,But it doesn't work
Please help!
|
|
|
|
|
And why it doesnt work?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I don't know.Maybe it use other windowsXP's dll? I copy user32.dll from winxp to win2000 and it don't work too.
|
|
|
|
|
PrintWindow is not supported in Win2K.
It is not enough to simply copy some DLLs from XP to make this work in Win2K.
I'm sure the call goes down to the kernel and calls some routines there.
So you will have to implement this the hard way without the PrintWindow function.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have a problem with EAXDirectSoundCreate method call. If I created a DLL which uses MFC, and in the DLL's InitInstance() to revoke EAXDirectSoundCreate. When application runs, and loads the DLL, then EAXDirectSoundCreate executed, application will hang up inside of that method. Need your help here how to fix the problem. Thanks.
|
|
|
|
|
How do we build a network using visual c++..The network is assumed as graph.
|
|
|
|
|
We usually build networks using cables, hubs, switches,...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
We also use of a Repeaters and A network card.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I should admit you're more advanced.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
No, you must have asked her to search for VC++ in Orkut, FaceBook ,etc. That's what the OP is looking for.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|