summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-04 19:22:57 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-04 19:22:57 +0100
commit8a8f2de504279ff80e674cfc5df15a52153afa28 (patch)
treeae9c81cb1516930c7ffb4dd3083b0439b2e104e0 /docs
parent3ce3006edd5f7d13c9167ead348f61d869dc0110 (diff)
downloadwolfbones-8a8f2de504279ff80e674cfc5df15a52153afa28.tar.gz
wolfbones-8a8f2de504279ff80e674cfc5df15a52153afa28.tar.bz2
added a lot more readmes and todos (around porting, windows, Sun CC compiler and logging)
Diffstat (limited to 'docs')
-rw-r--r--docs/log/README35
-rw-r--r--docs/log/TODOS5
-rw-r--r--docs/makefiles/windows_toolsuite.htm226
-rw-r--r--docs/port/README.SunPro3
4 files changed, 267 insertions, 2 deletions
diff --git a/docs/log/README b/docs/log/README
new file mode 100644
index 0000000..2c0de91
--- /dev/null
+++ b/docs/log/README
@@ -0,0 +1,35 @@
+Windows Logging:
+
+Problems to address here:
+- event logging is not only writting a string, there are event numbers,
+ message resource DLLs and FormatString involved here. This has to be
+ nicely integrated with the snprintf-way of logging on Unix/syslog.
+- EventLog can be done locally or remotly
+- strings like event sources can be localized again
+- how are log levels mapped to event types
+- how do we make use of event log's categories.
+- and of course all has to be buildable with a simple (N)Makefile
+- integration of strings like UNC host, event source, messages and their
+ character sets without adding a string abstraction layer or funny
+ switches in the code
+- tracing data should not go to neither syslog or event log
+- there should be some protection against flooding the logs as they
+ are a system-wide scarse resource!
+
+Other projects:
+
+- .NET EventLog class
+- log4j
+- POCOs EventLogChannel
+- www.codeproject.com/KB/cpp/logdriver.aspx
+- log4cpp
+- log4cplus
+
+All of them ignore the message resource and classes of same errors with
+different parameters. Sadly enough also the MS guys themselves (see
+184416764.html). log4j has influenced log4cpp, log4pp, logdriver (UMHO
+to the worse!).
+
+The category is usually used for mapping the coarser gained levels of
+the logging API to the event logger (POCO, log4cpp). IMHO this is better
+used for something like subsystems or components.
diff --git a/docs/log/TODOS b/docs/log/TODOS
index 2acb3af..bcbeee8 100644
--- a/docs/log/TODOS
+++ b/docs/log/TODOS
@@ -1,3 +1,4 @@
+- compare other approaches, disappointing all of them so far!
- local localized error handling (GetLastError and strerror_r strings)
- Windows event logger
- audit event log types, especially the effects on syslog and the upper
@@ -20,6 +21,6 @@
- the event logger can log binary data (as dumps), this helps to
debug things with the right event log DLL most likely, we have
to read more about that later.
+- there is an Windows Event Log book around which is quite big, find
+ out if it's still available
-links & literature:
-- there is an Windows Event Log book around which is quite big
diff --git a/docs/makefiles/windows_toolsuite.htm b/docs/makefiles/windows_toolsuite.htm
new file mode 100644
index 0000000..470ee7d
--- /dev/null
+++ b/docs/makefiles/windows_toolsuite.htm
@@ -0,0 +1,226 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
+<title></title>
+</head>
+
+<body>
+<h1>
+Microsoft C, C++, C# Compiler for Windows OS
+</h1>
+
+<pre>
+Get a Free and Legal Copy of Microsoft Compiler to develop and test your programs for Windows without quitting Linux.
+
+@ http://who.is.free.fr/wiki/index.php?MSVC
+
+Next goal is to make it fully usable with GNUmake thus by providing scripts that translate gnu standard command lines to Dos ones ... feel free to contact me if interessed.
+1/ GET IT
+
+The Compiler itself is free (not Libre but it cost nothing) and fully usable under Linux w/ wine
+
+get Microsoft Visual Tool Kit : (free version)
+
+http://msdn.microsoft.com/visualc/vctoolkit2003/
+
+ ed2k://|file|VCToolkitSetup.exe|32952488|c534888fa7605403dcb183d2d15282d1|
+
+Then you have compiler/linker (cl.exe) libc and standard includes.
+
+ #rzr@nrv:lib/$ ls /home/rzr/mnt/msvc2003/bin/
+ c1.dll c2.dll cl.exe.config link.exe msobj71.dll msvcp71.dll
+ c1xx.dll cl.exe dbghelp.dll link.exe.config mspdb71.dll msvcr71.dll
+
+ #rzr@nrv:lib/$ ls /home/rzr/mnt/msvc2003/lib/
+ kernel32.lib libcd.lib libcmt.lib libcpd.lib libcpmt.lib oldnames.lib
+ libc.lib libcd.pdb libcp.lib libcpd.pdb mscoree.lib
+
+Platform SDK is provided also (see further)
+
+Missing files and workaround :
+
+ * nmake / use GNUmake should be possible
+ * Windows Mfc OpenGL & DirectX libs ?
+
+2/ Msvc on Linux
+
+Unpack the archive (on Windows )
+
+ mv "Microsoft Visual C++ Toolkit 2003" /mnt/c/opt/msvc2003
+ ln /mnt/c/opt/msvc2003 ${HOME}/mnt/msvc2003
+
+then you can manage with some environement setting (to put in a script, ask me for it)
+
+ export MSVC_DIR_GNU="${HOME}/mnt/msvc2003/"
+ export MSVC_DIR_DOS="Y:\\mnt\\msvc2003\\"
+ export PATH="${MSVC_DIR_GNU}/bin:${PATH}"
+ export INCLUDE="${MSVC_DIR_DOS}include"
+ export LIB="${MSVC_DIR_DOS}lib"
+ export WINEDLLPATH="${DLL_DIR_GNU}:${MSVC_DIR_GNU}bin:${WINEDLLPATH}"
+ alias cl="${WINE} ${WINE_OPTS} ${MSVC_DIR_GNU}bin/CL.EXE"
+ ...
+ cl main.c && wine main.exe # et voila :)
+
+Well to avoid to loose time feel free to improove my wrapper script : http://rzr.online.fr/docs/contribs/bin/cc-msvc.sh (works also w/ vc98)
+3/ COMPILE & TEST Windows applications on Linux with Microsoft tools for Free
+
+ #rzr@nrv:cproject/$ cat cmain.c
+
+ #include <stdlib.h>
+ #include <stdio.h>
+ int main(int argc, char* argv[]) {
+ #ifdef _MSC_VER
+ printf("_MSC_VER=%d\n",_MSC_VER);
+ #endif
+ return ( EXIT_SUCCESS);
+ }
+
+ #rzr@nrv:cproject/$ ~/bin/cc-msvc.sh cl cmain.c
+ # wine /home/rzr/mnt/msvc2003/bin/CL.EXE cmain.c
+ Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3052 for 80x86
+ Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
+
+ cmain.c
+ Microsoft (R) Incremental Linker Version 7.10.3052
+ Copyright (C) Microsoft Corporation. All rights reserved.
+
+ /out:cmain.exe
+ cmain.obj
+
+ #rzr@nrv:cproject/$ cmain.exe
+ _MSC_VER=1310
+
+4/ PLATFORMSDK & USING WINAPI
+
+AS said on : http://www.winprog.org/tutorial/msvc.html
+
+Since this is the .NET SDK, it doesn't come with the headers and libraries required for Win32 API development, as these are part of the Platform SDK. Lo and behold, the Platform SDK is free as well. You only need the Core SDK, but feel free to download the other components as you desire.
+
+http://www.microsoft.com/msdownload/platformsdk/sdkupdate/downlevel.htm
+
+The platform SDK can't be easily got to because it uses ActiveX controls.
+
+Here are some direct links:
+
+ http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.bat
+ http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/Extract.exe
+ http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.1.cab
+ http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.*.cab
+ http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.13.cab
+
+ ed2k://|file|PSDK-FULL.1.cab|26221140|18832004fd27bb12a12144ab68cd32ca|
+ ed2k://|file|PSDK-FULL.2.cab|26221140|cc356f4cfb2fc3628efb69f3ba890f8b|
+
+ ed2k://|file|PSDK-FULL.13.cab|24343136|e64ef6ab33906f68cd3dd8022746bae8|
+ ed2k://|file|PSDK-FULL.bat|416|e68abfd97ea840d0841c21a6eee5540a|
+
+note that there are 13 files (of 25Mb each) : PSDK-FULL.1.cab to PSDK-FULL.13.cab, you'll need them all and the two files, PSDK-FULL.bat and Extract.exe in the same directory.
+
+thx baldurk @ http://irc.freenode.net/#winehq
+5/ TODO AND GOING FURTHER
+
+ * how to "emulate" gcc command lines ?
+
+is there a script that translate -I... to /I... etc ? then we can use the full GNU suite and w/ msvs
+
+ * wrap autoconf scripts
+
+ * I can use nmake from shell (bash) , but no along GNUmake
+
+ $ cat GNUmakefile
+ #NMAKE=${HOME}/bin/nmake.bat # stupid ^M
+ NMAKE=${HOME}/bin/nmake.sh
+
+ nmake: ${PROJECT}.mak
+ ${NMAKE} /f $<
+
+it seems that gmake happend some ^M to the comandline
+
+ NMAKE : fatal error U1065: invalid option '-'^M
+
+MISC TIPS
+CONSOLE
+
+How to enable disable console ( go to link options )
+
+ /subsystem:windows
+ /subsystem:console
+
+Or put this in your main.cpp
+
+ #pragma comment(linker,"/ENTRY:WinMainCRTStartup")
+ #pragma comment(linker,"/SUBSYSTEM:CONSOLE")
+
+FILES
+
+Semi Useless files : .opt .ncb ...
+
+http://filext.com/detaillist.php?extdetail=PDB
+
+A program database (PDB) file holds debugging and project state information that allows incremental linking of a Debug configuration of your program.
+SYMBOLS
+
+The following are keywords in Microsoft C and C++. You can't use any C keywords in a C++ program.
+
+Names with leading underscores are Microsoft extensions.
+
+C Language Keywords:
+
+ unsigned signed
+ short float char int double long
+
+ void enum union typedef struct sizeof
+
+ if else
+ while do for
+ switch case default
+ break goto continue
+ return
+
+ static const extern volatile register
+
+ asm pascal __fortran
+ fastcall self auto segment based __segname
+ cdecl huge inline interrupt loadds near
+ export far __saveregs
+
+C++ Language Keywords:
+
+ this class virtual friend private protected public
+ throw try catch
+ new delete
+ operator inline
+ multiple_inheritance single_inheritance __virtual_inheritance
+
+The following are not keywords, but they have special meaning in Microsoft C++:
+
+ main
+ argc argv envp
+ _setenvp _set_new_handler __emit _setargv
+
+ #ifdef _MSC_VER // will detect if you're using msvc ++
+ #endif
+
+MFC
+
+Is there any free implementation of MFC ? the wine project may did
+
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cwnd.asp
+MISC
+
+dll : libtool for msvc ? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/dynamic_link_library_entry_point_function.asp
+
+Emacs w/ msvc http://www.gnu.org/software/emacs/windows/faq10.html http://www.dotemacs.de/dotfiles/DavidJolley.emacs.html
+LINKS
+
+http://who.is.free.fr/wiki/index.php?MSVC
+
+http://appdb.winehq.com/appview.php?appId=53&versionId=31
+</pre>
+
+
+<hr>
+<address><a href="http://rzr.online.fr/">www.Philippe.COVAL.online.FR</a> </address>
+<!-- hhmts start -->Last modified: Mon Jul 12 13:05:45 CEST 2004 <!-- hhmts end -->
+</body> </html>
diff --git a/docs/port/README.SunPro b/docs/port/README.SunPro
index dd67b7b..1f66b97 100644
--- a/docs/port/README.SunPro
+++ b/docs/port/README.SunPro
@@ -1,3 +1,6 @@
Sun Studio 12
gmake CC=/opt/SUNWspro/bin/cc
+
+For compiler options see the "Sun Studio User Guide"
+(http://dlc.sun.com/pdf/819-5265/819-5265.pdf)