public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
From: bahrahm@yahoo.com
To: insight-gnats@sourceware.cygnus.com
Subject: insight/89: Cygwin build error
Date: Tue, 15 May 2001 09:03:00 -0000	[thread overview]
Message-ID: <20010515155636.15236.qmail@sourceware.cygnus.com> (raw)

>Number:         89
>Category:       insight
>Synopsis:       Cygwin build error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 15 09:03:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     bahrahm@yahoo.com
>Release:        unknown-1.0
>Organization:
>Environment:
cygwin 1.1.18, gcc 2.95.2-6
>Description:
Yesterday, I checked out Insight source code and 
tried to compile on Cygwin. And I got error messages.
The error message was about undeclared types such as
HKEY which is declared winreg.h in cmSystemTools.cxx file. Since windows.h includes winreg.h, the problem
seems to come from complier proprocess definitions.


==============Error Message======================
$ make
cd /cygdrive/d/insight_src/Cygwin/CMake/Source; make CMakeBuildTargets
make[1]: Entering directory `/cygdrive/d/insight_src/Cygwin/CMake/Source'
c++  -g -O2   -c ../../../Insight/CMake/Source/cmSystemTools.cxx -o cmSystemTool
s.o
../../../Insight/CMake/Source/cmSystemTools.cxx: In function `bool ReadAValue(st
ring &, const char *)':
../../../Insight/CMake/Source/cmSystemTools.cxx:207: `HKEY' undeclared (first us
e this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:207: (Each undeclared identifier
 is reported only once
../../../Insight/CMake/Source/cmSystemTools.cxx:207: for each function it appear
s in.)
../../../Insight/CMake/Source/cmSystemTools.cxx:207: parse error before `;'
../../../Insight/CMake/Source/cmSystemTools.cxx:210: `primaryKey' undeclared (fi
rst use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:210: `HKEY_CURRENT_USER' undecla
red (first use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:214: `HKEY_CURRENT_CONFIG' undec
lared (first use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:218: `HKEY_CLASSES_ROOT' undecla
red (first use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:222: `HKEY_LOCAL_MACHINE' undecl
ared (first use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:226: `HKEY_USERS' undeclared (fi
rst use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:229: parse error before `;'
../../../Insight/CMake/Source/cmSystemTools.cxx:231: `KEY_READ' undeclared (firs
t use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:231: `hKey' undeclared (first us
e this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:231: implicit declaration of fun
ction `int RegOpenKeyEx(...)'
../../../Insight/CMake/Source/cmSystemTools.cxx:231: `ERROR_SUCCESS' undeclared
(first use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:237: `DWORD' undeclared (first u
se this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:237: parse error before `,'
../../../Insight/CMake/Source/cmSystemTools.cxx:238: `dwSize' undeclared (first
use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:240: `LPTSTR' undeclared (first
use this function)
../../../Insight/CMake/Source/cmSystemTools.cxx:240: parse error before `.'
../../../Insight/CMake/Source/cmSystemTools.cxx:248: confused by earlier errors,
 bailing out
make[1]: *** [cmSystemTools.o] Error 1
make[1]: Leaving directory `/cygdrive/d/insight_src/Cygwin/CMake/Source'
make: *** [/cygdrive/d/insight_src/Cygwin/CMake/Source/CMakeBuildTargets] Error
2
===================================================

======= Source Code (cmSystemTools.cxx)=============
Line: 48
#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <windows.h>
#include <direct.h>


Line: 179

#ifdef _WIN32

// Get the data of key value.
// Example : 
//      HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath
//      =>  will return the data of the "default" value of the key
//      HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.4;Root
//      =>  will return the data of the "Root" value of the key
bool ReadAValue(std::string &res, const char *key)===================================================

>How-To-Repeat:
"Insight Source Directory"/configure
>Fix:
I added three lines:

#if def _WIN32 
#include <windows.h>
#endif 

at ther top of cmSystemTools.cxx and it seemed to solve
the problem.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-05-15  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-15  9:03 bahrahm [this message]
2002-01-04 14:09 kseitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010515155636.15236.qmail@sourceware.cygnus.com \
    --to=bahrahm@yahoo.com \
    --cc=insight-gnats@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).