The link to PCRE setup for Regex at sourceforge is broken. Any ideas on somewhere else i can download it?

-- DominicFuller - 19 Oct 2008


ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

I couldn't download it form their normal pages but if I went over to their sourceforge project page and browsed all their download packages it would work.

-- RickMach - 20 Oct 2008

thanks man

-- DominicFuller - 20 Oct 2008

One more thing though. I followed the instructions and updated the environmental variables in the c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat file and im still getting an error. "c:\documents and settings\owner\desktop\all my stuff\gps project\gpstk\dev\src\stringutils.hpp(69) : fatal error C1083: Cannot open include file: 'regex.h': No such file or directory" I can't find a regex.h file anywhere in the gpstk files or PCRE files. What is going on?

-- DominicFuller - 20 Oct 2008

Regex.h isn't in the gpstk but it should be in the PCRE package you installed. I didn't try to install this latest version but when I did it on my computer it was installed to c:\Program Files\GnuWin32\include\regex.h. Is it there on your computer? Did you pick a different install path? You need to make sure where ever it got installed is consistent with your modifications to the Visual Studio environment variables.

-- RickMach - 20 Oct 2008

I added the "include" folder (including regex.h) to the project but it's still giving me the same error. In the instructions for installing regex support it said to update the "PATH, LIB, and INCLUDE variables in your compiler configuration settings". I did this by editing the vsvars32.bat file to include the folders specified. I also tried changing environmental variables to include those folders. Is this correct?

-- DominicFuller - 20 Oct 2008

oh, i actually solved that one. I just copied all the files from the include folder for PCRE into the C:\Program Files\Microsoft Visual Studio 9.0\VC\include directory and it stopped that error. But now im getting two fatal errors (apart from about 50 warnings). Its asking for 'getopt.h' and 'debug\vc90.pdb'. I tried trashing the debug folder and recompiling, but that didn't get rid of it. I also googled 'getopt.h' and found some source code but i want to make sure i can just make a new header file and copy in the code. Thank you SOOO much for your help by the way, im not very good at C++...yet.

-- DominicFuller - 21 Oct 2008

well, you should not have needed to copy the files over. if you did, it is because the path was not setup correctly. Get opt is also in the gpstk source directory so if it is not finding it, something else is wrong. Are you using the "jam" command to build the software? Make is not supported with Visual Studio. If you don't have jam, you can download it from the gpstk website.

-- RickMach - 21 Oct 2008

Hi everyone, I have very similar problem with regex.h library. I added variables to PATH and other environment settings path to “...GnuWin32\include\regex.h” but I have still an compile errors. This is a log file from Visual C++ 2008 compiler

When I copied this 3 files from “...GnuWin32\include\” to VC++ folder or to project or added as a path to additional library in project, I have problem with linking project and an error like this: 1>Position.obj : error LNK2001: unresolved external symbol __imp__regexec

Jam software don”t work properly as well and give me this kind of errors and logs: LINK : fatal error LNK1181: cannot open input file 'regex.lib'

Could anyone give me advice what I need to do or what is wrong and how to resolve this problems? I use a Visual C++ platform and other recommended utilities Configure files with changes are in folder

-- DanielZinkiewicz - 16 Dec 2008

Looking at the additions to the path it looks like it is correct. The only think I noticed is that there is an ending '\' where the other examples don't have that. I can try that when I'm back at my windows box to see if that effect being able to locate the regex.lib file. I would double check the file exists where expected and that the path is correct.

-- RickMach - 16 Dec 2008

I removed in all files and system settings path ending ('\') but it nothing changed. I have really no idea what I do incorrect. Someone has another idea what could be wrong?

-- DanielZinkiewicz - 18 Dec 2008

I just tried a build with the latest version of the GPSTk in subversion and it built and linked fine so I suspect it is something specific to your setup. Here is a description of my build environment so maybe it can help you figure out what is wrong with yours. I have installed the free version of Microsoft Visual Studio 8. I'm running the build shell with the command:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86

I have installed PCRE into c:\Program Files\GnuWin32\. In the GnuWin32\lib directory I have the files libregex.dll.a regex-bcc.lib regex.lib regex2.def. In the GnuWin32\include directory I have the regex.h file.

I updated the file C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat. I have attached my updated file.

I downloaded a copy of jam from the GPSTk website and placed it in my C:\Program Files\Microsoft Visual Studio 8\VC\BIN directory.

At this point you should be able to go into the gpstk\dev directory and be able to type jam and everything should build. I'm not sure what else I can do to help you at this point. You need to go through your specific setup and see where there is an error. I do not believe it is an issue with the GPSTk or instructions as they have worked for us. I'm marking this question as answered at this point. Please change the status and add a comment if you think there is something else we can provide.

-- RickMach - 19 Dec 2008

Now it helps!!!

Thanks for detailed instruction. Problem was with missing library which should be in GnuWin32\lib directory. Follow the instruction on InstallingRegexSupportForVisualCPP site I installed only PCRE and package of PCRE didn’t contain a libregex.dll.a regex-bcc.lib regex.lib I was sure that PCRE package contain this libraries. After installing =regex-2.7= package all files was found in place and jam built all sources. To linked everything in VC++ I need to copy several *.obj files to VC++ project folder because VC++ linker showed me still errors.

All procedures work only with gpstk1.5 sources but not with tarball and svn files which probably don’t contain regex.h and regex.c files.

My advice is to add clear information on page InstallingRegexSupportForVisualCPP about installing regex package. It make less confusions for next users.

One more time thank for your help!

-- DanielZinkiewicz - 19 Dec 2008 No such template def TMPL:DEF{PROMPT:supportquery}

Topic attachments
I Attachment Action Size Date Who Comment
vsvars32.batbat vsvars32.bat manage 1.7 K 19 Dec 2008 - 17:11 RickMach Updated Visual Studio C++ file for PCRE
Topic revision: r14 - 14 Apr 2009, DanielZinkiewicz

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback