|
Never mind.
I thought he wasn't able to get the program work under debug mode and it crashed in the release mode.
[Add] There's this thing of what does "not working" mean when the OP says it. With my previous reply, I was thinking that the code compiles and links, but resultant executable will crash. But, now I'm thinking if he isn't able to get past the linker or something like that. You'll never be able to guess all the "not working" posts correctly. [/Add]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
No, if you read his OP he says that it works in "Release mode" (I think NDEBUG may be a better term), but crashes, or does not link, in DEBUG mode. However he has not really explained his problem very well.
Rajesh R Subramanian wrote: You'll never be able to guess all the "not working" posts correctly.
I think a reasonable translation would be "I have no idea what I'm doing, urgent plz".
|
|
|
|
|
I disagree. Debug configuration and debugger is a luxury not a necessity.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: debugger is a luxury not a necessity.
Interesting opinion. However, I think that the debugger is a necessity, and not a luxury.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Something is necessary if removing it means that the system it is part of is no longer usable. Removing integrated debugger from Visual Studio does not mean we cannot program anymore, hence it is not necessary. It just means that it will take longer (potentially) to find bugs in the code. Just look at linux, there are no good integrated debugging enviornemnts (comparable to VS) but it hasnt stopped people from creating some really cool software.
In my opinion, we are just too much used to integrated debuggger.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: Something is necessary if removing it means that the system it is part of is no longer usable. Removing integrated debugger from Visual Studio does not mean we cannot program anymore, hence it is not necessary. It just means that it will take longer (potentially) to find bugs in the code. Just look at linux, there are no good integrated debugging enviornemnts (comparable to VS) but it hasnt stopped people from creating some really cool software.
Yeah? I think that I'd do myself a favour and continue to think of the debugger to be an essential part of my day to day development.
Saurabh.Garg wrote: It just means that it will take longer (potentially) to find bugs in the code.
With 3000+ source files in a projects, I think that it would take "a bit" longer to locate bugs, leave alone fixing.
Saurabh.Garg wrote: In my opinion, we are just too much used to integrated debuggger.
Fair enough! Everyone is entitled to have an opinion. In my opinion, I need the debugger and I think that it plays a very crucial role in my daily development activities.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: In my opinion, I need the debugger and I think that it plays a very crucial role in my daily development activities.
Yes debugger is crucial in development and I am not saying that I dont use it. I completely agree with you.
What prompted me to this dicussion was your reply to OP about there is no release mode until program works in debug mode. That implies it is a bad practice to not use a debugger during development. I think it is perfectly fine to work in release mode and swtich to debugger only when a bug needs to be fixed.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: I think it is perfectly fine to work in release mode and swtich to debugger only when a bug needs to be fixed.
Again, *you* think that.
I think that it is imperfect to start working right away in release mode. The debug mode means a lot (it does a lot of work for you) and several bugs will go unnoticed in the release mode, which the debug mode is capable of detecting.
It is assumed that you have fixed all the bugs and that you are heading to optimise the program now, when you start to build in release mode. Please read the Debug vs Release article I pointed out earlier; it explains everything in great detail.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
What is the linker complaining about? Multiple defined symbols or undefined symbols.
-Saurabh
|
|
|
|
|
Hi, dear all,
I am working on a project in VC++ and inside it I will invoke a excel file which already xml schema mapping on it, now I can put value to specified cell protect/unprotect workbook, but I don't know how to use Workbook.XmlImport() method to import xml file data to the spreadsheet. How can I do it.
I didn't use #import excel.exe...........
Any suggestion are very welcome!
Andraw
|
|
|
|
|
I forgot to mention that I use OLE and IDispatch interfaces to access excel.
Thanks!
|
|
|
|
|
Hi all vc++ programmers,
I am migrating my project from vs-2003 to vs-2008... i am getting the following linking errors...Actually i have 10 .lib files out of which three .lib files are not getting linked..My application is working sucsessfully in release mode...but not working in debug mode... the errors are:
fwpipd.lib(Fwstbk.obj) : error LNK2019: unresolved external symbol "public: int __thiscall DomDebtInfo::HasBeenBilledForFee(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > const &,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > const &HasBeenBilledForFee@DomDebtInfo@@QAEHABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@0@Z) referenced in function "protected: virtual int __thiscall CFeeStBaseBkNotes::IsEligible(class DomObject &,class DomObject &IsEligible@CFeeStBaseBkNotes@@MAEHAAVDomObject@@0@Z
fwpipd.lib(fwstlt.obj) : error LNK2001: unresolved external symbol "public: int __thiscall DomDebtInfo::HasBeenBilledForFee(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > const &,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > const &HasBeenBilledForFee@DomDebtInfo@@QAEHABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@0@Z)
Like this i am getting 362 errors........
I have seen in one of the forums that i should wrap the .lib in a DLL and consume that from my application..but i dont get the point..can anybody suggest me about this..............
and please give me any suggestion to go further.....
tanks in advanceeee
|
|
|
|
|
Did you rebuild all your libraries in VS2008? It looks like an entrypoint name is not defined in one of the libraries, and it may just be that the library needs to be recompiled under the new version of the compier/linker.
|
|
|
|
|
Hi thanks for the reply,,,
Yes i have rebuild all the libraries in vs-2008.Actually i am trying my 2003 code with Vista compatiable.In my company i am taking a remote login to Vista machine where vs-2008 is installed..I am getting the .exe in release mode and not getting in degug mode...I am getting the specified errors...I am getting these errors because the corresponding libraries are not getting linked.
|
|
|
|
|
Vetukuri Raju wrote: I am getting these errors because the corresponding libraries are not getting linked.
Well, you seem to have answered your own question. Get these libraries linked in to your exe file, and it should be OK.
|
|
|
|
|
Hi,I created a complete Explorer window, used a CMFCShellTreeCtrl object associated with a CMFCShellListCtrl object.
And now,i want to make the CMFCShellTreeCtrl to show the items about pdf only! i did this
writing:
void CExplorerListCtrl::OnLvnInsertitem(NMHDR *pNMHDR, LRESULT *pResult) //CExplorerListCtrl:public CMFCShellListCtrl
{
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
// TODO:
CString currentFolder;
GetItemPath(currentFolder,pNMLV->iItem); //pNMLV->iItem is always 0
if (GetSuffix(currentFolder).MakeLower()!=_T("pdf")) //i'm sure GetSuffix(Cstring str) is right
{
DeleteItem(pNMLV->iTem);
}
*pResult = 0;
}
program is always broken off!
Best thanks!
|
|
|
|
|
I want to detect USB pen drive when it is inserted in the PC. My MFC project will list its contents(Files n directories) to allow user to move or copy them.
How to do THIS!
Manmohan Bishnoi
|
|
|
|
|
Have you looked at the WM_DEVICECHANGE message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Follow my name, to my articles. One of them should do exactly what you want.
Iain.
[modified:] ps, OK, I'll help you be lazy:
Detecting when drives are added or removed[^]
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
modified on Monday, September 21, 2009 12:31 PM
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: Follow my name, to my articles. One of them should do exactly what you want.
Iain Clarke, Lazy Programmer.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Well, the article is pretty well titled, in an appropriately named section.
So my initial thought was that is they could not even be bothered to follow my instructions, they can do without help!
As you can see, I weakened!
Iain Clarke, Softie Programmer!
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Thanks, good to know!
/Lazy Moak
|
|
|
|
|
I am using the original thread pool API provided by Windows (Not the latest one present in Vista and above) and I use QueueUserWorkItem[^] to submit new work to the queue.
After the threads start to execute and several work items are queued, is there any way with which I could find out the number of threads alive in the threadpool (including idle ones, if any)? I know that I can be monitoring this with tools like ProcessMonitor from sysinternals. But, that's not what I want. I'm not able to find something like GetThreadCount() the thread pool API.
I do understand that there is no need for me to know this, because the thread pool API guarantees to take care of dynamically creating or destroying threads depending on the work load and other criteria. However, I'm just curious.
Many thanks.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: I was I'm not able to find something like GetThreadCount() the thread pool API.
The CreateToolhelp32Snapshot() function with TH32CS_SNAPTHREAD might be helpful. isnt it?
DWORD GetThreadCount()
{
THREADENTRY32 stThreadEntry = {0};
stThreadEntry.dwSize = sizeof( stThreadEntry );
HANDLE hSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
if( !Thread32First( hSnap, &stThreadEntry ))
{
return 0;
}
int nCount = 0;
DWORD dwCurrentProcessId = GetCurrentProcessId();
do
{
if( dwCurrentProcessId == stThreadEntry.th32OwnerProcessID )
{
nCount ++;
}
} while (Thread32Next(hSnap, &stThreadEntry ));
return nCount;
}
|
|
|
|
|
Hi Naveen,
Just wanted to quickly say thanks. I don't have VS installed, so I'll have to get back to the development machine to try it. On the other hand, it looks like this is going to return me the number of threads that my application is running. I'll be in a bit of yogurt in that case. I say it because there are threads started and being run from other modules as well (outside of the thread pool code, but within the app) and I want to be able to find the number of threads that specifically belong to the pool. I think I'll need to put in a bit more research.
But this is definitely a good start. Thanks again.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|