|
Yep, they work fine together. Need a damn big hard disk though.
Giles
|
|
|
|
|
I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything):
--------------------Configuration: TestGL - Win32 Debug--------------------
Linking...
TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z)
Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
TestGL.exe - 2 error(s), 0 warning(s)
I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.
|
|
|
|
|
First thing would be to do a rebuild all.
If that doesn't help then for some reason the CPP file that contains the definition for CColour isn't being included in the link or isn't being defined. See if it has been removed from the project.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Somehow the linker is not finding the definition for the CColour constructor referred to. Possible reasons:- The definition is actually lacking.
- The definition is in some file that is not being linked (maybe you deleted from the project accidentally).
- Sometimes the precompiled headers feature makes funny thing and a "Rebuild all" drives it back to sanity.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I wanna use CFileFind to find all .doc files in my drive ,including sub directory.The thing I do is with GetFileName() get the string the name of each file and check the last three charachter if it is .doc .Is there any better and faster way for it?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Look at the example for CFileFind::IsDirectory in MSDN. I believe it contains what you are looking for. Just change the filter that is passed to the FindFile function from
strWildcard += _T("\\*.*");
to
strWildcard += _T("\\*.doc");
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
No,if I do that that it does not give me sub folders.
Thanks.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
FileFind has an IsDirectory test, from memory. You need to write a recursive function that calls itself on the subdirectories it finds.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
i have 2 classes.
the first class is a crecordview class (Cmain) that holds my data, and is the main dialog for my program.
the second class is a cdialog (Creport), and is opened modal from the crecordview class dialog.
my problem is i have created a class function in the Cmain labeled Cmain::GetData(). this function works fine if i run it from Cmain dialog. I can not find a way to call it from Creport. How can this be done.
If i include the header for Cmain in Creport i get all kinds of errors.
thank you for any help
|
|
|
|
|
Have you included the Cmain header in creport.h or creport.cpp ? If the former, try the latter.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i tried both and get the same errors
c:\src\cmain.h(75) : error C2143: syntax error : missing ';' before '*'
c:\src\cmain.h(75) : error C2501: 'Cmaindoc' : missing storage-class or type specifiers
c:\src\cmain.h(75) : error C2501: 'GetDocument' : missing storage-class or type specifiers
C:\src\creport.cpp(507) : error C2248: 'Cmain::Cmain' : cannot access protected member declared in class 'Cmain'
c:\src\cmain.h(28) : see declaration of 'Cmain::Cmain'
|
|
|
|
|
Are you including cmain.h after stdafx.h ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Could you cut and post from the beginning of creport.cpp to the offending #include ? It ought be a simple thing, but I guess my inspiration is failing me
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
all i have on the top of my file is
// creport.cpp : implementation file
//
#include "stdafx.h"
#include "cmain.h"
#include "creport.h"
//////////////////////i have also tried to creport.h before cmain.h
i did find the following article on msdn. i have not made any since of it yet though.
HOWTO: Declare Classes That Refer to Each Other
Q136005
--------------------------------------------------------------------------------
The information in this article applies to:
The Microsoft C/C++ Compiler (CL.EXE)
Microsoft Visual C++ for Windows, 16-bit edition, versions 1.0, 1.5, 1.51, 1.52
Microsoft Visual C++, 32-bit Editions, versions 1.0, 2.0, 2.1, 2.2, 4.0, 4.1, 5.0, 6.0
--------------------------------------------------------------------------------
SUMMARY
In C++, you may need to have two classes that contain data members that refer to the other class as in this example:
class B
{
A * x;
};
class A
{
B * x;
};
This article shows by example how to declare two classes that contain pointers to the other class. The two classes (A and B) are derived from other classes (C and D) to better demonstrate this issue.
If the two classes are not declared correctly, errors such as the following can occur:
test1.h(8) : error C2501: 'B' : missing decl-specifiers
test1.h(8) : error C2143: syntax error : missing ';' before '*'
test1.h(8) : error C2501: 'x' : missing decl-specifiers
MORE INFORMATION
Sample Code
/* Compile options needed: none
*/
//================================
// test1.h
//================================
#ifndef _a_
#define _a_
class B;
class A : public D
{
B * x;
};
#endif
//================================
// test2.h
//================================
#ifndef _b_
#define _b_
class A;
class B : public C
{
A * y;
};
#endif
//=================================
// test.cpp
//=================================
class C
{
int q;
};
class D
{
int p;
};
#include "test1.h"
#include "test2.h"
void main(void)
{
}
Additional query words: 8.00 8.00c 9.00 9.10
|
|
|
|
|
I've found several C++ classes that do POP3 and SMTP communication, but I've not found anything for IMAP communication. I want to write a little program that can act as an IMAP client and grab the count of new messages waiting in an account on an IMAP server. Anyone know of a class out there that handles IMAP client-side communication?
~ Steve
|
|
|
|
|
If getting a message count is all you want to do, you'd be as well to just use CSocket or CAsyncSocket and implement the IMAP4 yourself.
Search for an RFC for IMAP; you'll see its pretty simple.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I wanna to write application that does not have any interface and I want to run it on win98.My question is:
I want each time win98 starts,this application run and also it shouldn't appear in start menu.What should I do?
I use MFC.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
HKLM/Software/Microsoft/Windows/CurrentVersion/Run to get your app to start
Either have your CWinApp class do the work (ie no Window), or pehaps better than that, just SW_HIDE your main window.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Thank you,John.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I have a CListBox derrived control on a dialog and i want to change the background color.
What should i write to accomplish this task?
rechi
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks, but I saw it before and it's about changing the items' background.
I need to change the listbox window's back color, not the items'.
rechi
|
|
|
|
|
OK, how about this one then?
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
If you have c-like structure in your code and you create a static member pointer to that structure in your class, what is the proper way of deleting it then? For instance, I instantiate this static member outside of my class as following CMyClass::x = new structre...
this is all part of a dialog wizard class within one of the pages. So I started by deleting this thing in my page's destructor by going delete CMyClass::x, but at times this crashes because it appears that eventhough new has been called on the structure, the structure is empty. What is the proper way of making sure that there is no left overs then, in a scenario like this?
|
|
|
|