I've built bcp on windows with VS14.1 and no matter what I do I keep getting the following error:
std::exception Found a closing ) with no corresponding openening parenthesis. The error occurred while parsing the regular expression fragment: '?+(([(<].*>>>HERE>>>)?$)?'.
I tried escaping slashes via double slashes, absolute path, etc, but none of them seems to work. My boost version is 1.66
./bcp.exe D:/boost/boost_1_66_0_precompiled/boost/shared_ptr.hpp D:/boost/boost_1_66_0_precompiled
./bcp.exe D:\\boost\\boost_1_66_0_precompiled\\boost\\shared_ptr.hpp D:\\boost\\boost_1_66_0_precompiled
./bcp.exe boost/shared_ptr.hpp extract
Funnily enough, when I deliberately add a wrong directory, it shows "Destination path does not exist" instead.
Related
I use qtcreator and have imported my project with New->Import Existing Project (this is the kind of project i need help with).
When compiling and having errors, the error messages shows up in the "Compile Output"-panel like so:
In file included from ../../src/tasklist.cpp:1:
../../src/tasklist.h:74:9: error: expected member name or ';' after declaration specifiers
But because file paths is specified relative to the build path and not to the root path, qtcreator fails to parse the messages and put annotations in code and in the "Issues"-panel. This slows work considerably compared to having the errors marked out by the editor.
How do I make qtcreator recognize the paths in the error message?
I'm running ubuntu, but the problem exists also when i compile with ninja in windows.
I have tried to write a custom error matcher, that picks up the pattern in the editor view, but it does not seem to run, when building. The build is also set to the directory where the compiler messages assumes that you originate from.
I've currently got it working with the following custom error message capture pattern:
(.*):(\d+):\d+: error: (.*)
My build folder is in a custom location, so I believe it's handling the file paths correctly.
If the parser doesn't seem to be running at all, then I don't think the file paths are the problem. For example, if I change my custom parser so the filename and line number are swapped, the parser still runs, but when I double-click the issue in the "Issues" panel, it says something like "File not found: 5". So, if the file paths are the only problem, it should still parse into issues.
We are using an environment variable to specify a path to a library we use. Most of the time it points to the released version but sometimes to a development version.
Anyway, it works ok when I use $(MyLib)/path;%(AdditionalIncludeDirectories) for building the C++ application but I can not open the project resources. However, when I use %(MyLib)/path;%(AdditionalIncludeDirectories) it works.
Now, what is the difference?
I thought the correct way is to use $(EnvVar) but for the resource editor it doesn't seems to work. And if $(EnvVar) is the correct way then why does Visual Studio use %(AdditionalIncludeDirectories) and not $(AdditionalIncludeDirectories)
The error I get is: fatal error RC1015: cannot open include file 'afxres.h'.
You use %(item) to refer to an MSBuild metadata item. Using $(AdditionalIncludeDirectories) would not work well if you also had an environment variable by that name. So %(MyLib)/path ought to resolve to just /path.
You can put echo %(MyLib)/path in a prebuild event to verify this.
Which is probably enough to stop confusing rc.exe, the resource compiler. Which is a stone-cold-old SDK utility, going back all the way to Windows version 1.0. It is pretty temperamental, very picky about command line options and .rc script file text encoding. Do keep in mind that it dates from an era long before Windows started to support a forward slash as a path separator, everybody had to use a backslash back in 1986.
So use "$(MyLib)\path" instead, including the double quotes so you don't confuzzle it when MyLib contains embedded spaces. And do favor using a project property sheet instead so there are some odds that somebody can still figure out how to get the project built correctly 2+ years from now.
I am currently trying to copy a subset of regex (also known as regular expressions) library and its dependencies so I can bring it to school to work with. I could be using Microsoft's regular expressions from the C++11 standard library, but my school's computers do not support the C++11 library.
Anyways, to make this possible, I have compiled the bcp tool successfully and I have typed
bcp boost/regex.hpp <my destination folder> on my command prompt window.
The problem is that I get the following error:
**** exception(205): std::runtime_error: Found a closing ) with no corresponding openening parenthesis. The error occurred while parsing the regular expression fragment: "?+(([(<].*HERE>>>)?$)?".
Any kind of advice would be appreciated.
Very peculiar. The quoted code has an OPENING ( with no corresponding closing parenthesis. Try escaping the open parenthesis with a slosh \:
"?+(([\(<].*HERE>>>)?$)?"
This would not alter the regular expression, but may help the parser.
Disclaimer: the error message is translated from Swedish (and it's a pain to find the exact corresponding error message in English, Microsoft take note...)
The error message could also be "Path ' ' not found" or "Path not found". It's a bit unclear due to the Swedish message not enclosing the path in ' '.
This is similar to this question, but not exactly: New Windows Service installed, fails to start: "System error 2 ... system cannot find the file specified"
I have written the service myself. It is an exe written in unmanaged C++ and is using the following external code:
libntlm - loaded as dynamic library (libntlm-0.dll placed in same location as executable)
OpenSSL - loaded as static library
pugixml - compiled directly into code
The problem I'm having is that it doesn't start when Windows starts, but it does start if I manually start it!
I am stumped as to what could be wrong. The only thing I can think of is if perhaps the dll can't be found, but I don't know why it wouldn't. Something with the environment variables being different perhaps?
What I have tried:
Checked registry, path is correct
Path is to local disk
Changed to a number of different paths (no change)
Made sure there are no spaces in the path
Logging at start of program (nothing written to log, so it's not an internal path not found error)
Dll is in same path
Set to start with my own network account (no change)
Tried renaming exe to be the same as service name (no change)
Tried registering libntlm-0.dll with regsrv32 but that didn't work
Put libntlm-0.dll in System32 (no change)
For posterity it seems like the delayed start suggested by 51k seems to work. I don't know why that should make any difference, but as long as it works I'm happy.
I'm attempting to build/install/use the Poco C++ Libraries. I'm running Ubututu (Natty). I've compiled the static libraries which are working fine, but when I set the env var PROJECT_BASE to a path containing spaces, I get errors:
make
/bin/sh: Syntax error: Unterminated quoted string
/bin/sh: Syntax error: Unterminated quoted string
/home/username/Documents/poco-1.4.1p1/build/rules/global:62: *** Current working directory not under $PROJECT_BASE. Stop.
I've set PROJECT_BASE to:
/files/Dropbox/Myname\'s\ Work/C++\ Work
which I believe should be escaped correctly? Adding a trailling backspace gives me the alternate error of:
make
/bin/sh: Syntax error: Unterminated quoted string
awk: line 1: runaway string constant "/files/Dro ...
/home/username/Documents/poco-1.4.1p1/build/rules/global:62: *** Current working directory not under $PROJECT_BASE. Stop.
I might be missing something basic, but I've been wrestling for a few days now to get the Poco C++ Library build system set up how I want it to no avail :S I know the README said something about SYMBLINKS screwing up the PROJECT_BASE, but I'm no using any :S /files is an ext4 mount (same hdd, seperate partition) if that's relevant at all.
Thanks for your help!
For anyone else getting the: "* Current working directory not under $PROJECT_BASE. Stop." error, I found a solution that maybe sounds obscure.
Basically, if any of the parent directories are symlinks, it will generate this error.
IMPORTANT: Make sure that the path to the build directory does not
contain symbolic links. Furthermore, on Mac OS X (or other systems
with case insensitive filesystems), make sure that the characters in
the path have the correct case. Otherwise you'll get an error saying
"Current working directory not under $PROJECT_BASE.".
http://pocoproject.org/docs/00200-GettingStarted.html
In my case, I was compiling the library 5 levels deep and the second directory was a symlink. Changing it to a directory resolved the issue.
HTH
It requires great care and deliberate effort to make systems such as makefiles handle pathnames with spaces accurately. It can be done; it is not trivial. It is fairly clear that this package has not been so modified; it is like the majority of such packages.
If you really want to make life hell for yourself, use a pathname such as:
/home/mine/He said, "Don't do it!"/poco-1.4.1
Spaces, single and double quotes -- at least it doesn't include backquotes, dollars, parentheses, newlines, etc.
In the meantime, bow to the inevitable - use a pathname without spaces etc in it.
If your problem is not with symlinks, as in my case, you probably are not specifying a full path, but instead a relative one, as indicated in the following blog post.
http://fatalfeel.blogspot.com/2013/09/poco-with-cocos2d-in-android-and-ios.html