Need help building a program using gnu win32 regex library

Barry Kimelman <[email protected]> Fri, 22 Mar 2019 15:06:14 -0600
Newsgroups gmane.comp.windows.gnu.user
Message-ID <CAMPa0rX6uXT6JnsJMpbBYbGtqHmz1jkuD5hso2Lgw5RXXrjxrg@mail.gmail.com>
I am attempting to build a program on my windows 10 system using the gnu
win32 regex library.

I am using the developer console under microsoft visual studio 2017

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.7
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>


I have copied the DLL file for the regex code to the directory containing
my source code. when I compile the code I specify an option to point to the
directory containing the gun win32 regex.h file. However when I attempt to
compile the program I receive the following error messages

C:\barry\dosutils>cl "/I%INCGNU%" regex1.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

regex1.c
Microsoft (R) Incremental Linker Version 14.16.27027.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:regex1.exe
regex1.obj
regex1.obj : error LNK2019: unresolved external symbol __imp__regcomp
referenced in function _main
regex1.obj : error LNK2019: unresolved external symbol __imp__regexec
referenced in function _main
regex1.obj : error LNK2019: unresolved external symbol __imp__regerror
referenced in function _main
regex1.exe : fatal error LNK1120: 3 unresolved externals

I have been looking through the supplied documentation that came with the
gun win32 regex library and there is nothing there showing me how to
compile a program. How do I resolve these errors ?

Thanks


-- 

====================

Barry Kimelman
Winnipeg, MB, Canada