|
|
Hi...
i got problem when compiling & linking my app in visualC++. I got the error msg like this:
------------------- the error msg -------------------
Linking...
Cobalagiah.obj : error LNK2001: unresolved external symbol "public: static int __cdecl ReadBitstreamFile::create(class ReadBitstreamFile * &)" (?create@ReadBitstreamFile@@SAHAAPAV1@@Z)
Debug/Cobalagiah.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cobalagiah.exe - 2 error(s), 0 warning(s)
------------------- end of the error msg -------------------
the situation is as follow. there is one workspace with many projects in it. I have to make my own project in the same workspace and utilize some classes from other projects (within the same workspace).
So i set the directory paths to include the other header files (Tools - Options - Directories tab). by doing that i can put the code #include "ReadBitstreamFile.h" and compiling it was ok.
but then when I put this code in the main function (just for testing)
----------------- my testing code -----------------
int main(int argc, char* argv[])
{
ReadBitstreamFile *pcReadBitstreamFile;
ReadBitstreamFile::create( pcReadBitstreamFile );
printf("Hello World!\n");
return 0;
}
----------------- end of my testing code -----------------
that error occurs. note that the "create" function is a static function. it is defined in other class in other project.
anybody can help, please?
regards,
Hendry
email at: hendry197-at-msn-dot-com
|
|
|
|
|
You have also to add the cpp file in which ReadBitstreamFile is defined to your project. Do that simply by tight-clicking on the file views on the directory with the source files of your project. Then select add file (or something similar, depends of the IDE you are using).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
hendry197 wrote: that error occurs. note that the "create" function is a static function. it is defined in other class in other project.
Is this other project a library? If so, you need to include the header and add that lib to your project.
|
|
|
|
|
maybe you need to import library(lib) in your program
whitesky
|
|
|
|
|
I just tried it. I just tried to add the path to the .obj (.obj is like lib too, right?) files too. it seems work. thank you guys ^_^
regards,
Hendry
|
|
|
|
|
hi all
i have a problem .
In Listbox by typing the first character of a selection the item can be selected
is it possible to restrict this property of list box
if possible how??
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
hiiiiiiiiiii,
this is the solution...
u have to do is:
1) u need to Dervie a class from CListBox
2) map the listbox in ur application to Derived listbox class.
3)Override the virtual function OnChar in ur Derived class.
void CMyListBox::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
//CListBox::OnChar(nChar, nRepCnt, nFlags); important
}
comment this code
CListBox::OnChar(nChar, nRepCnt, nFlags);
Regards
Prashanth.v
|
|
|
|
|
thanks
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
Try this way. Using Add Class command, add a new MFC class derived from CListBox . Then add to this class a handler for WM_CHAR notifications. In this handler, return without calling anything.
In the dialog box where list box is used, select the list-box and then use Add Variable in order to add a control variable. In the Variable Type field, specify the name of your list-box class.
If you already have a variable for your list, then open the header file of your dialog and replace CListBox type with the name of your list-box class.
Hope it helps.
|
|
|
|
|
I use NcAPI & Netcard2280 to programm for USB device. How determine a packet is NULL packet when Netcard get packet form host PC
-----------------
conglt
|
|
|
|
|
I've written an application which will use virtual COM port (USB-to-Serial) to communicate with my device. I am using CreateFile/ReadFile/WriteFile functions. It is running fine until one issue found.
With the application open, when (somehow) the USB driver reload, my application fail to perform read/write. Even after I close the application and reopen it, it fails to get the handle.
Why is it happen? Are there anything that my application need to do when the USB driver is re-loaded?
Thanks.
TC
|
|
|
|
|
hi all,
How can i run C++ code in BREW application because brew has it's own function and i want to generate my own function in BREW and pass the string.
and that string i pass another string after click in emulator.can you help me out for that.
Thanks...........
Nitin Dalal.
nitin
|
|
|
|
|
:(CString FilePath;
FilePath = writeFilePath+ DMID + "." + test;
// then FilePath = c:/temp/1234.jpg
objEWFFile.Open(FilePath, CFile::modeCreate | CFile::modeWrite, NULL);
It doesn't work...
How can FilePath change to LPCTSTR ??
|
|
|
|
|
mimimimilaw wrote: It doesn't work...
In what way? What errors do you get? When do you get them, compile time or runtime?
Did you debug your source code?
|
|
|
|
|
You can do this as
CString str="abcd";
const char* data_char = (LPCTSTR) str;
//However you shouldn't be having any errors with opening the file using a CString type filename
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 2:24 Tuesday 20th June, 2006
|
|
|
|
|
CString has a LPCTSTR cast operator, which means you can safely do
LPCTSTR lpStr = (LPCTSTR)oMyCStringObj;
|
|
|
|
|
mimimimilaw wrote: It doesn't work...
How can FilePath change to LPCTSTR ??
What is the type of objEWFFile ??
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Are you sure the // FilePath = c:/temp/1234.jpg path is correct?
check it and try following for opening file.
objEWFFile.Open((LPCTSTR)FilePath.GetBuffer(0), CFile::modeCreate | CFile::modeWrite, NULL);<br />
FilePath.ReleaseBuffer();
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
can you explain for me whats wrong in this code
<br />
CString FilePath;<br />
CString writeFilePath;<br />
writeFilePath=_T("e:\\");<br />
CString DMID;<br />
DMID=_T("123");<br />
CString test;<br />
test=_T("jpg");<br />
CFile objEWFFile;<br />
FilePath = writeFilePath+ DMID + _T(".") + test;<br />
objEWFFile.Open(FilePath, CFile::modeCreate | CFile::modeWrite, NULL);<br />
whitesky
|
|
|
|
|
here i have a problem to access the portnumbers of different applications running in my project
#sankar#
|
|
|
|
|