Topics / Index

The Compiler MS Visual C++ Version 5

Content (automatic)

Installation

When installing the Version 5 compiler, then confirm all predefined settings.
After installation add the include direcory C:\HOME\CC\INCLUDE, where are my header files.
Before linking internet applicatons, which use the socket library wsock32.lib, execute C:\HOME\CC\MDOS50.BAT. By this drive K: will be substituted as K: => C:\PROGRA~1\DEVSTU~1 

Creating a new workspace for a new main program

Main programs are usually in C:\HOME\CC\UTIL or C:\HOME\CC\HTMUTIL or C:\HOME\CC\QQ
For programs which do not use graphics use the Menu [Datei] [Neu] [Projekte]
For programs which do use graphics use the Menu [Datei] [Neu] [Projekte] This will create a subdirectory C:\HOME\CC\UTIL\MDOS50\HEME resp. C:\HOME\CC\UTIL\MSVC50\GRA2 and in it the workspace file and the subdirectories DEBUG and RELEASE.
Then add to this empty project [Projekt] [Dem Projekt hinzufügen...] the file heme.cpp
Then build the project. You will get a lot of undefined references (externals)
Find the source file in C:\HOME\CC\LQ\*.cpp which satisfies the references. The menu [Bearbeiten] [Suche in Dateien...] may help you with this.
Before you run the program, select a working dorectory in [Projekt] [Einstellungen...] 

Include directories

C:\Programme\DevStudio\VC\INCLUDE
C:\Programme\DevStudio\VC\MFC\include
C:\Programme\DevStudio\VC\ATL\include
c:\msdev\include
c:\msdev\mfc\include
C:\Programme\DevStudio\SharedIDE\bin\%include%
C:\HOME\CC\INCLUDE
required standard libraries are (from K:\VC\LIB)
wsock32.lib
libc.lib oldnames.lib kernel32.lib
and for mfc application koppsend :
copy kernel32.lib ..\lib
copy user32.lib ..\lib
copy gdi32.lib ..\lib
copy winspool.lib ..\lib
copy comdlg32.lib ..\lib
copy advapi32.lib ..\lib
copy shell32.lib ..\lib
copy ole32.lib ..\lib
copy oleaut32.lib ..\lib
copy uuid.lib ..\lib
copy odbc32.lib ..\lib
copy odbccp32.lib ..\lib
copy wsock32.lib ..\lib

copy libc.lib ..\lib
copy libcmt.lib ..\lib

copy libcd.lib ..\lib
copy comctl32.lib ..\lib
copy OLDNAMES.lib ..\lib
copy WININET.LIB ..\lib
copy libcpmt.lib ..\lib

In [Projekt] [Einstellungen] [Linker] are :
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libcpmt.lib oldnames.lib comctl32.lib wininet.lib libcd.lib

Installation of DAO

Requires for Samples\DAOREAD as well the installation of an ISAM drivers as 

The linker error Symbol __endthreadex und __beginthreadex not resolved

If this occurs then :

The linker finds the symbols new and delete twice

nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) bereits in LIBCD.lib(new.obj) definiert

nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) bereits in LIBCD.lib(dbgdel.obj) definiert
Action: define an additional library in [Project] [Settings] [Linker] [Object-/Library modules] : nafxcwd.lib
_MT,_AFX_NO_DEBUG_CRT

Error : help does not work

Visual Studio 5.0 and Internet Explorer 6.0.2900.2180.xpsp_sp2 on Windows XP : the display of help files does not work.
Solution: Double click a file "chm_:repair.reg" which contains the follow:
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000002

... Anzeige .chm geht nicht mehr

Need to change a security setting:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_MK_PROTOCOL]
“MSDEV.EXE”=dword:00000000


(needed for V5 from XP SP2)
after http://blog.kalmbachnet.de/?postid=14

DEBUG-Output

Textes (const char *) , which have been output by the function / macro TRACE( "Hier bin ich" ) will occur in the Compilers Debug.
Textes (const char *) , which have been output by the function / macro OutputDebugString( "Hier bin ich" ) will occur in the Compilers Debug.

See also

msvc40.htm - Earlier, using Version 4.0
msvc10.htm - Earlier, using Version 1.52

www

http://hubbard.engr.scu.edu/embedded/avr/msvc_make/msvc_make.html - Configuring Microsoft Visual C++ for use with an external compiler