|
I downloaded the latest copy and ran the vcvars32.bat. Then I ran nmake to build the boost libraries. All worked fine. Next I tried a simple test app to experiment with boost regex. The app will not complie and there is an error message: 'BOOST_REGEX_VC6_MDID.DLL' missing.
In the settings for C++ -> Reprocessor I added the path to "Additional Library Paths" I also set the library path for the Link -> Input setting.
How can I tell if the VS6 environment paths are set correctly and that the proper include and lib paths are set?
Mark
|
|
|
|
|
Have you built Boost. Most of Boost is simple header files and doesn't need building but the more complicated libraries such as Boost.Regex need to be built. You will have to mess around with "bjam".
Steve
|
|
|
|
|
I followed the instructions in this article:
Adding Regular Expressions to Your App with Regex++
I believe that the RegEx download from Dr. John Maddock's site has already been built using bjam.
When I tried compiling the demo app that the CP article lists the system returns the missing DLL error message.
Mark
|
|
|
|
|
Mark F. wrote: I believe that the RegEx download from Dr. John Maddock's site has already been built using bjam.
My comments were on Boost; I'm not sure what the deal is if you download RegEx separately. Still though, Regex uses STL and is packaged in .lib files (part of it anwyay). It uses the STL that your compiler uses. Given that the C++ ODR (One Definition Rule) states that all definitions of a class must be consistent in all compilation units this implies that you'll have to build RegEx using your compiler's libraries to ensure this consistency. Perhaps it has already been pre-built for a number of popular compilers, but I doubt it. Also if you've modified your STL, by installing the Dinkum VC6 STL fixes for example, you'll have to rebuild it.
Steve
|
|
|
|
|
NICE POST! [twothumbsup]
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Where do i start when figuring out an error LNK2019: unresolved external symbol ?
I defined a function that returns a map
std::map<int, const="" char="" *=""> getMyMap
Whenever i try to call this function, getMyMap, i get the error.
|
|
|
|
|
LCI wrote: Where do i start when figuring out an error LNK2019: unresolved external symbol ? MSDN...?
It seems that the definition of getMyMap can't be found, if it's in another file make sure that you are linking with it.
|
|
|
|
|
It is all in the same class..
The definition was made in the .h file and the function is in the .cpp and it is also being called from there...
|
|
|
|
|
Found the problem.. it was my fault.
The defintion in the .cpp was without the class identifier.
Silly me...
Sorry
|
|
|
|
|
well... don't know what to say
|
|
|
|
|
Newbie question here. I have a bunch of text that I want to write both to the stdout and to a logfile using fprintf. Currently, I'm using the primitive method of just printing out everything twice, once to the stdout and once to the logfile. I thought about an elegant way of doing this, and the best I could come up with is to overload fprintf so it'll take two FILE* arguments, like fprintf(stdout, logfile "text %d", x, ...) etc. While trying to overload fprintf, however, I ran into difficulties since it takes a variable argument list and the overloading seems to be a lot more complicated. I played around with va_list, va_arg and such but ended up getting nowhere.
Is there an easy way of doing this, or can anyone offer some assistance in coding this up?
Thanks a lot in advance.
|
|
|
|
|
look at vfprintf(...) it takes a va_list
|
|
|
|
|
Have you considered:
void MyPrintf( const char *pFormat, ... )
{
va_list marker;
va_start(marker, pFormat);
vprintf(pFormat, marker);
vfprintf(stderr, pFormat, marker);
va_end(marker);
}
void main( void )
{
MyPrintf("%s\n", "Hello World");
MyPrintf("%d\n", 123);
}
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there any way to get a signal from the PC to my application when a USB device is added or removed from the PC. I have a USB chip (CP2102 from Silicon Laboratories), and I am currently polling every second and looking to see if it is still in the registry or not.
There must be any easier way to detect a USB connection or disconnection in C or C++. Is there anyway to ask Windows to send me a message or an event?
|
|
|
|
|
1 - RegisterDeviceNotification
2 - you can register a notification callback on changes to registry keys
earl
|
|
|
|
|
Thank you for pointing me in the right direction. I will try that tonight.
|
|
|
|
|
Hi fellows
In my app I have a treeview with some nodes. I want to select one of them and it will be highlighted. The problem is that I don`t get highlighted neither selected. This is my code to select a node:
[Code]
case WM_NOTIFY:
{
LPNMHDR notifyMessageStruct = (LPNMHDR)lParam;
if(notifyMessageStruct->hwndFrom == treeViewHwnd)
{
if(notifyMessageStruct->code == NM_CLICK)
{
nodeSelected = (HTREEITEM)SendDlgItemMessage(hwnd, IDC_TREE1, TVM_GETNEXTITEM, TVGN_CARET, (LPARAM)nodeSelected);
if(nodeSelected == NULL)MessageBox(NULL, "", "", MB_OK);
TreeView_EnsureVisible(hwnd, nodeSelected);
SendDlgItemMessage(hwnd, IDC_TREE1, TVM_SELECTITEM, TVGN_CARET, (LPARAM)nodeSelected);
SendDlgItemMessage(hwnd, IDC_TREE1, TVM_SELECTITEM, TVGN_DROPHILITE, 0);
}
}
break;
}
[/Code]
My code to create the treeview:
[Code]
treeViewHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "theTreeView", WS_CHILD|WS_VISIBLE|TVS_TRACKSELECT|TVS_EDITLABELS|TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT, 0, 0, 400, myRect.bottom, hwnd, (HMENU)IDC_TREE1, hCurrentInstance, NULL);
[/Code]
Someone can helps? Thanks again
|
|
|
|
|
Not really sure what you are trying to do there. But maybe the tree doesn't have the focus and that's why you are not seeing the selection.
Add this TVS_SHOWSELALWAYS to the flags when you are creating the tree to see if that helps.
AliR.
Visual C++ MVP
|
|
|
|
|
I've been apointed to provide support for an old project which exports some data in xml files and then posts them on some web server. The problem is that the person that worked with this project before me does not check the xml data for chars like '<','>','&' and so forth.
The ideea is that instead of goint trough all the project and finding out where those xml's are created, i want to check them right before they get posted (which thankfuly is done by a single method).
Is there another way of finding '<' and '>' chars that are part of a node data without searching that file char by char?
|
|
|
|
|
|
I am attempting to play a sound when a button is clicked. I am using Microsoft Visual Studio .NET 2003 and to create my project I clicked File->New->Project, chose Visual C++ Projects and then Windows Forms Application (.NET). I then added a button to the form and in the click event I put the following code
PlaySound(_T("C:\\Windows\\Media\\chime.wav"), NULL, SND_LOOP);
I also included at the top of the file windows.h.
The errors that I receive are
error C2065: 'SND_LOOP' : undeclared identifier
error C3861: 'PlaySound': identifier not found, even with argument-dependent lookup
I would appreciate any help.
Thanks in advance
Keith
|
|
|
|
|
You created a managed application and PlaySound is an unmanaged function.
See this for help
CodeProject search[^]
AliR.
Visual C++ MVP
|
|
|
|
|
Did you include Mmsystem.h
whitesky
|
|
|
|
|
Hi, guys,
is there a way to intercept mouse clicks or keystrokes when an application runs in the background (a window does not have a focus) without using global Win32 hooks?
Thanks a lot.
|
|
|
|
|
Write a Keyboard Filter Driver
Write a Mouse Driver Filter
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|