.
D 2000-10-26T00:56:07
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3813\sBug\nVersion:\s8.2.2\nSubmitDate:\s'1999-12-08'\nLastModified:\s'1999-12-08'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sWindows\s95\nOSVersion:\sWin95\s(same\scode\sworks\sfine\sunder\sRH\sLinux\s6.1\son\sthe\ssame\sPC)\nMachine:\sCyrix\sP200+,\sMatrox\smystique\sSVGA,\s64MB\sRAM,\sTX\schipset,\sSMC\seth\nFixedDate:\s'2000-10-25'\nClosedDate:\s'1999-12-08'\n\n\nName:\nSimon\sGreaves\n\nCustomShell:\njust\sthe\sabove\spatch\sto\stcl.h\n\nComments:\nOther\sproblems\sI've\shad\srelated\sto\sthe\sBorland\scompilers\sare:\n\ninport\sand\sstatic\slibrary\sfile\sformat\sincompatabilities:\sBorland\sprovide\sa\stool\s(implib)\sto\sderive\simport\slibs\sfrom\sDLL's\swhich\sworks,\sbut\sstatic\slibraries\sare\sstill\sa\sproblem.\sI\swanted\sto\suse\sthe\sstubs\sinterface\sand\sto\sdo\sso\sI\shad\sto\sbuild\sit\sfrom\ssource\s(which\sonly\srequired\sthe\sabove\spatch).\sOnce\sI'd\sdone\sthis\sI\swas\sable\sto\sbuild\sthe\sextension\swith\sstubs\ssupport\stoo.\n\nThe\stcl\ssymbols\sin\sthe\sdll's\sdo\snot\shave\sunderscores\sadded\sby\sthe\scompiler\swhereas\sthe\sBorland\scompiler\sdoes.\sThis\scan\sbe\sdisabled,\sbut\sBorland's\sC\sruntime\s_does_\shave\sunderscores\son\sall\sthe\ssymbols.\sI\sworked\saround\sthis\sby\sswitching\soff\sthe\sauto\sunderscore\sfeature\sand\screating\sa\sdefine\sfor\seach\sof\sthe\sthe\sRTL\ssymbols\sI\sneeded\swith\san\sunderscore\sprepended\seg:\n\n#if\sdefined\s(__WIN32__)\s&&\sdefined\s(__BORLANDC__)\n#\s\sdefine\ssprintf\s_sprintf\n#endif\n\nI\shave\sused\sother\slibraries\swhich\sI\sbelieve\swere\scompiled\swith\sVC\swhich\sdid\snot\scause\sthis\sproblem,\swould\sit\sbe\spossible\sfor\syou\sto\sproduce\sdll's\sthat\swork\swith\seither\scompiler\swithout\sbreaking\sVC\ssupport?\sI\stried\susing\sgcc\sfrom\sCygwin-b20\sbut\sthis\shad\sother\sproblems\s(issues\swith\swinsock\setc).\n\nI\sam\swilling\sto\sprovide\smore\sdetails\son\srequest.\sI\smay\scompile\stcl/tk\swith\sBorlandC,\sif\sso\sI'd\sbe\shappy\sto\sprovide\s'borland\scompatible'\sversions\sof\sthe\slibraries.\n\nReproducibleScript:\nI\sbelieve\sthe\sdocumentation\sprovided\sin:\shttp://www.scriptics.com/services/support/howto/winext.html\nfor\scompiling\swith\sBorland\sC\scompilers\sis\sincorrect,\sat\sleast\sfor\sreasonably\srecent\sversions\sof\sthe\scompiler.\sI\smade\sa\strivial\schange\sto\stcl.h\sto\senable\sthe\smacros\sfor\sBorland\sC.\sIf\syou\sagree,\sI'm\swilling\sto\shelp\supdate\sthe\sdocument.\n\nI've\salso\shad\ssome\sproblems\swith\sthe\stcl\slibraries\sand\sthe\sBorland\sC\scompiler.\n\nDesiredBehavior:\nThe\sBorland\scompilers\sI\shave\s(Borland\sC++\sv5.2\sand\sC++\sBuilder\s3,\sBCC32\sv\s5.02\sand\s5.03)\sseem\sto\ssupport\s\s'__declspec(dllexport)'\s\sfor\sbuilding\sDLL's.\sI\smade\sa\sminor\smod\sto\sthe\stcl.h\sinclude\sfile\sso\sthe\sDLLIMPORT\sand\sDLLEXPORT\smacros\sget\sdefined\sas\sthey\sdo\sfor\sVC.\n\nPatch:\n***\stcl.h.dist\s\sWed\sDec\s\s8\s10:32:46\s1999\n---\stcl.h\s\s\s\s\s\s\sMon\sDec\s\s6\s22:08:04\s1999\n***************\n***\s220,226\s****\n\s\s#\sdefine\sDLLIMPORT\n\s\s#\sdefine\sDLLEXPORT\n\s\s#else\n!\s#\sif\sdefined(__WIN32__)\s&&\s(defined(_MSC_VER)\s||\s(defined(__GNUC__)\s&&\sdefined(__declspec)))\n\s\s#\s\s\sdefine\sDLLIMPORT\s__declspec(dllimport)\n\s\s#\s\s\sdefine\sDLLEXPORT\s__declspec(dllexport)\n\s\s#\selse\n---\s220,226\s----\n\s\s#\sdefine\sDLLIMPORT\n\s\s#\sdefine\sDLLEXPORT\n\s\s#else\n!\s#\sif\sdefined(__WIN32__)\s&&\s(defined(_MSC_VER)\s||\s(defined(__BORLANDC__)\s&&\s__BORLANDC__\s>=\s0x500)||\s\n(defined(__GNUC__)\s&&\sdefined(__declspec)))\n\s\s#\s\s\sdefine\sDLLIMPORT\s__declspec(dllimport)\n\s\s#\s\s\sdefine\sDLLEXPORT\s__declspec(dllexport)\n\s\s#\selse\n\nPatchFiles:\ntcl.h\n\n\n\nThe\sitems\sin\sthe\sabove\smentioned\sURL\sshould\sprobably\sbe\sremoved.\nStories\sof\sBorland's\schanging\sbehavior\shave\slead\sus\sto\sdrop\sit\nin\sgeneral\sfrom\sthe\ssupported\scompilers,\salthough\susers\scan\spatch\nit\sagain\sif\snecessary.\s\sIdeally\sit\sshould\swork\swith\sthe\ssame\nmakefile\sand\ssources\sas\sMSVC\s(and\sreportedly\sdid\sin\ssome\sversion),\nbut\swe\ssee\sits\sfickleness\sin\sthis\sresponse:\n\nFrom:\sDavid\sCuthbert\s<[email protected]>\n\[email protected]\swrote:\n>\sDesiredBehavior:\n>\sThe\sBorland\scompilers\sI\shave\s(Borland\sC++\sv5.2\sand\sC++\sBuilder\s3,\n>\sBCC32\sv\s5.02\sand\s5.03)\sseem\sto\ssupport\s\s'__declspec(dllexport)'\s\sfor\n>\sbuilding\sDLL's.\s\n\nActually,\sBC++\s5.2\s(aka\sC++Builder\s1)\shas\ssome\sbugs\sin\sthis\sregard\s--\sit\nwill\soccasionally\signore\s__declspec(dllexport)\sfor\sseemingly\srandom\smethods\nand\sfunctions\sand\smake\sthe\slinker\scomplain\slike\scrazy.\s\sChanging\sunrelated\ncode\swould\ssometimes\salleviate\s(or\smutate)\sthe\sproblem,\sas\sdid\sremoving\nprecompiled\sheaders.\s\s__export\sand\s__import\swere\snot\saffected\sby\sthis\nproblem.\n\nC++\svirtual\sdestructors\sseemed\sto\sexhibit\sthis\sbehavior\smost\sfrequently.\s\nC++Builder\s3\s(BC++\s5.3)\sdoes\snot\sseem\sto\shave\sthis\sbug.\n\nYou\smight\swant\sto\sconsider\sinstead:\n\n#\sif\sdefined(__WIN32__)\s&&\s\s(defined(_MSC_VER)\s||\s\s(defined(__BORLANDC__)\s&&\s\s__BORLANDC__\s>=\s0x500\s&&\s\s__BORLANDC__\s!=\s0x520)\s||\s\s(defined(__GNUC__)\s&&\sdefined(__declspec)))\n#\s\s\sdefine\sDLLIMPORT\s__declspec(dllimport)\n#\s\s\sdefine\sDLLEXPORT\s__declspec(dllexport)\n#elif\sdefined(__BORLANDC__)\s\n#\s\s\sdefine\sDLLIMPORT\s__import\n#\s\s\sdefine\sDLLEXPORT\s__export\n#else\n#\s\s\sdefine\sDLLIMPORT\n#\s\s\sdefine\sDLLEXPORT\n#endif\s\n--\s12/08/1999\shobbs\n\n
J foundin obsolete:\s8.2.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 75.\sTutorial
J title problem\sbuiling\sextensions\swith\sBorland\sC\s5.2
J type Bug
K 218319ffffffffffffffffffffffffffffffffff
U nobody
Z d22fd57a6c48f94ff0292136808a2032