Exporting const variables from DLLs (GCC bug?)
Hi, Given this source code: extern const int meaning_of_life __declspec(dllexport); const int meaning_of_life __declspec(dllexport) = 42; GCC complains: $ c++ -g -O2 -c test.cxx -o test.o test.cxx:2: error: external linkage required for symbol 'const int meaning_of_life' because of 'dllexport' attribute. However, it compiles successfully with the const qualifier removed: extern int meaning_of_life __declspec(dllexport); int meaning_of_life __declspec(dllexport) = 42; Why does adding the const qualifier change this? Is this a known limitation of DLLs? If so, the error message is a little confusing. If not, then this is a GCC bug. Removing the explicit extern line has no effect in either case. My Cygwin installation was updated recently - I'm using the standard Cygwin GCC 3.3.1-3 package: $ c++ --version c++ (GCC) 3.3.1 (cygming special) If you want any more info, just ask. Incidentally, this bug affects src/sid/component/ in the Cygwin CVS tree. I'd prepared this minimal test case before I realized that this subdirectory isn't needed to build the Cygwin DLL. (Doh! CVS doing unexpected things strikes again). Kind regards, Jon Foster -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: New SGML/XML packages
Hi Peter, Thanks for reviewing these packages. sgml-base-1.01, xml-base-1.1: A bit messy. How are these resources related? If somebody wanted to add another bit, how would you release that? Looking at these packages again, I agree with you that sgml-base and xml-base had too many miscellaneous DTDs. I've cut down sgml-base so that it only contains the catalog tool, the ISO entities, and the HTML DTDs. All these are components are essential, and unlikely to change. I've cut down xml-base and split it into two - there are now separate xml-char-ent and xhtml packages. Since both of these are likely to change, I want them separate so they are easier to maintain. DSSSL and XSLT stylesheets: Different versions of stylesheets might need to co-exist, in my humble experience. Not easy with this directory layout. At the point you need to do that, you're going to have to download and install the packages yourself, rather than using setup.exe. If you do that, you can rename the directory and (for DSSSL) fix up the catalog file manually. docbook-sgml-4.1, docbook-xml-4.1.2: Why bundle various DocBook versions into one package? They do not depend on each other. How do you intend to release forthcoming DocBook 4.2? The problem is simple: How many packages do we release? I've proposed two - docbook-sgml and docbook-xml. If we do every version as a separate package, then we have ten different docbook packages. This seems a little excessive, and IMHO is also likely to confuse users. Please note that the effort to make a directory layout for XML and SGML part of the LSB [1] is now continued. There's a mailing list [2]. The latest proposal is, I believe, at [3] (and it was sorely lacking wrt. XML). I looked at the FHS when I was creating these packages. It hardly mentions XML at all, only SGML. There doesn't seem to be a consensus opinion on XML in the mailing list archives. For now, I've complied with the FHS as far as practical - e.g. the SGML master catalog is in the right place, SGML DTDs are in the correct location. I hope that it won't be too hard to migrate from my current packages to whatever the LSB (eventually) decides. By the way, the Debian distribution differs in a number of details [4]. Yep, when I was putting these packages together I started off with the Debian packages. The install-sgmlcatalog script is borrowed from Debian. Thanks regards, Jon Foster -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/
Uninstall scripts?
Hi all, I know that after I install a package, setup.exe runs the postinstall script /etc/postinstall/packagename.sh. Is there an equivalent script which is run before a package is uninstalled? (There is a central catalog file that needs updating when packages containing SGML or XML DTDs are added or removed. Currently, dead links are left in it). Thanks in advance. Kind regards, Jon -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/
Re: updated tei-xml available
Hi Markus, Markus wrote: Jon, Apparently there is a problem with the version number string in the tei-xml package. I decided to rename the packages and to update setup.hint accordingly. There were no internal changes to the archives, so you could rename them locally as follows: tei-xml-4-1.tar.bz2 tei-xml-4-1-src.tar.bz2 setup.hint needs 4-1 as the version string. Done. The changed package is now on the server for testing. As before, just point setup at http://www.toomanysecrets.net/~foster/cygwin/ Blue skies, Jon -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/
Re: updated tei-xml available
Hi, Markus wrote: I fixed the path error in the tei-xml package. Could you please update the package in your repository. I've updated the version on http://www.toomanysecrets.net/~foster/cygwin/ Blue skies, Jon -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/
Re: can not start cygwin.
Hi Dave, I'm not sure how this happened but somehow the extension .bat got removed from my 2k file associations table. I've remade the .bat file extension and told it to open with c:\winnt\system32\cmd.exe however cygwin is still not starting. Does anyone have an idea as to what i missed? Yep, batch files are probably still broken - they're not simply associated with cmd.exe. Try TweakUI 2000 (an unsupported download somewhere on the Microsoft site - you'll have to search for it). This has an option to repair your file associations back to the MS defaults. Or possibly try setting the open command for batch files to %1 (WITH the quotes). Kind regards, Jon Foster -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/ - Original Message - From: dave [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 7:43 PM Subject: can not start cygwin. Hello, I'm not sure how this happened but somehow the extension .bat got removed from my 2k file associations table. I've remade the .bat file extension and told it to open with c:\winnt\system32\cmd.exe however cygwin is still not starting. Does anyone have an idea as to what i missed? Thanks. Dave. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Dependency checking broken in new setup.exe?
Hi all, I'm using the new version of setup.exe, and package dependency checking doesn't seem to work any more. With the old setup.exe (version 2.125.2.10), if I do install from internet and choose to install the texmf package, then the texmf-base and tetex-beta packages are both automatically selected for installation. If I then cancel and fire up the new setup.exe (version 1.194.2.15), this does not happen any more. If I pick the texmf package, then only that package is selected. When I click OK, only that one package is installed. I am using the same mirror each time (programming.ccp14.ac.uk). According to setup.ini, @ texmf ... requires: cygwin tetex-beta texmf-base. Kind regards, Jon Foster -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: MS C++ Patent (WAS: DirectX8/DirectInput + cygwin)
Hi, I'm talking about the specific implementation of the virtual table - the layout of the function pointers relative to the this pointer. The location and format of the vtable relative to the this pointer in Visual C++ is patented by Microsoft. I wish I knew the patent number... I think it's US Patent 5,297,284, Method and system for implementing virtual functions and virtual base classes and setting a this pointer for an object-oriented programming language. Here's a direct URL (split over 4 lines 'cos it was too long): http://patft.uspto.gov/netacgi/nph-Parser? Sect1=PTO1Sect2=HITOFFd=PALLp=1 u=/netahtml/srchnum.htmr=1f=Gl=50s1='5297284'.WKU. OS=PN/5297284RS=PN/5297284 Standard disclaimer applies to this post - I am not a lawyer. :-P Regards, Jon -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/ - Original Message - Barubary [EMAIL PROTECTED] wrote: Aren't virtual tables a feature of C++? cgf I'm talking about the specific implementation of the virtual table - the layout of the function pointers relative to the this pointer. The location and format of the vtable relative to the this pointer in Visual C++ is patented by Microsoft. I wish I knew the patent number... -- Barubary -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: /dev/registry
Hi, Chris January [EMAIL PROTECTED] wrtote: How about adding a /dev/registry fhandler to Cygwin? Registry keys would be directories and values in the registry files. UWIN (a commercial alternative to cygwin) has something similar. See http://www.research.att.com/sw/tools/uwin/ They use /reg, but I agree that /dev/registry or /proc/registry would be better. Regards, Jon Foster -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: crypt 1.0-1 - Errors linking a C program
Hi Ben, $ gcc -lcrypt -o app main.c undefined reference to `crypt' I've tried gcc with and without -lcrypt... any ideas? Try: $ gcc -o app main.c -lcrypt From http://cygwin.com/faq/faq_4.html#SEC93 : : gcc processes the files listed on the command line in : sequence and will only resolve references to libraries : if they are given after the file that makes the reference. Regards, Jon Foster -- The knack of flying is learning how to throw yourself at the ground and miss. - Hitchhiker's Guide to the Galaxy E-mail: [EMAIL PROTECTED] web: http://www.jon-foster.co.uk/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
DocBook and OpenJade packages
Hi all, I've recently installed the DocBook text processing system under CygWin. This was quite fiddly, as there are many small tools that have to be downloaded and configured. I'm willing to volunteer to produce and maintain proper CygWin packages for these tools, so that they can be easily installed by just choosing the packages in the setup program. * Is this something you'd like? * Is anybody currently working on this? As per the guidelines at http://cygwin.com/setup.html, I've written proposed setup.hint files - they're at the end of this e-mail. Comments welcome. I haven't started working on the actual packages yet. Kind regards, Jon Foster --- sgml-base/setup.hint --- # This package is assembled from: # - A perl script to maintain the SGML catalog file, probably from Debian's # sgml-base package, and probably modified for cygwin - I haven't checked # yet. # - ISO entity definitions, from http://www.oasis-open.org/cover/ISOEnts.zip # - HTML 3.2 DTDs from http://www.w3.org/TR/REC-html32 # - HTML 4.0 DTDs from http://www.w3.org/TR/1998/REC-html40-19980424 # - HTML 4.01 DTDs from http://www.w3.org/TR/1999/REC-html401-19991224 # category: Text requires: perl bash # perl - To run the SGML catalog maintainace script. # bash - To run the post-install script to set up an SGML catalog. test: 1.01-1 sdesc: A basic SGML tree, and tools to maintain it. ldesc: A basic SGML tree, and tools to maintain it. Includes the ISO entities, and the definitions of HTML 3.2, 4.0 and 4.01. --- openjade/setup.hint --- # Original source: http://openjade.sourceforge.net/ category: Text requires: cygwin sgml-base bash # cygwin- This package contains binaries. # sgml-base - So we can add DTDs to the SGML catalog. # bash - To run the post-install script to update the SGML catalog. test: 1.3.1-1 sdesc: The OpenSP SGML parser and the OpenJade DSSSL processor. ldesc: The OpenSP SGML parser and the OpenJade DSSSL processor. OpenSP is a library for reading SGML files. OpenJade can transform SGML files into other formats, such as HTML and TeX files. The transformation is controlled by DSSSL style sheets (not included). OpenJade is commonly used with the docbook and docbook-dsssl packages. For more information, see http://openjade.sourceforge.net/; --- xhtml-dtd/setup.hint --- # Original sources: # XHTML 1.0 DTD: http://www.w3.org/TR/xhtml1/ # XHTML 1.1 DTD: http://www.w3.org/TR/xhtml11/ # # (This package is included for completeness, not because DocBook needs it). # category: Text requires: sgml-base libxml2 bash # sgml-base - So we can add DTDs to the SGML catalog. # libxml2 - So we can add DTDs to the XML catalog. # bash - To run the post-install script to update the SGML # and XML catalogs. test: 1.1-1 sdesc: DTDs defining XHTML 1.0 and 1.1, for use by XML and SGML tools. ldesc: DTDs defining XHTML 1.0 and 1.1, for use by XML and SGML tools. For more information, see http://www.w3.org/MarkUp/; --- docbook/setup.hint --- # Original source: http://www.oasis-open.org/docbook/ category: Text requires: sgml-base openjade bash # sgml-base - So we can add DTDs to the SGML catalog. # bash - To run the post-install script to update the SGML catalog. # openjade - not really required for installation, but if you # want to do anything *useful* with it you'll need an # SGML parser, and openjade is the only one cygwin offers. test: 4.1-1 sdesc: An SGML DTD for writing books and other documentation. ldesc: An SGML DTD for writing books and other documentation, especially technical documentation. To convert DocBook documents to other formats such as HTML, you also need the package docbook-dsssl. This DTD is also available in XML flavour (in package 'docbook-xml'). See http://www.oasis-open.org/docbook/ for more information. --- docbook-xml/setup.hint --- # Original source: http://www.oasis-open.org/docbook/ category: Text requires: sgml-base libxml2 bash # sgml-base - So we can add DTDs to the SGML catalog. # libxml2 - So we can add DTDs to the XML catalog. # bash - To run the post-install script to update the SGML # and XML catalogs. test: 4.1.2-1 sdesc: An XML DTD for writing books and other documentation. ldesc: An XML DTD for writing books and other documentation, especially technical documentation. To convert DocBook documents to other formats such as HTML, you also need the package docbook-xsl. This DTD is also available in SGML flavour (in package 'docbook'). See http://www.oasis-open.org/docbook/ for more information. --- docbook-dsssl/setup.hint --- # Original source: http://docbook.sourceforge.net/ category: Text requires: sgml-base openjade docbook perl bash # sgml-base - So we can add DTDs to the SGML catalog. # openjade - not really required for installation, but if you # want to do anything *useful* with it you'll need a # DSSSL engine, and openjade is the only one cygwin offers. # docbook - We