Re: Compiling db-lib using Visual C++ 2005 Express
LacaK <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Frediano Ziglio wrote / napísal(a): > 2014-05-27 14:55 GMT+01:00 LacaK <[email protected]>: > >> Hi, >> here are 3 patches for Visual Studio project files, which adds missing >> files. >> I have tested it under Win32/Visual C++ 2005 Express. >> >> > > Applied > Thanks > >> To successfuly compile there must be done also other changes for example add >> into "replacements" / PreprocessorDefinitions - _WIN32_WINNT=0x0400 >> >> > > >> I have not added it to patch because I do not know if it is needed only on >> Win32 platform or also x64 platform ? >> >> > > Probably yes, and I think is safe even in 64 bit > Attached patch: replacements.vcproj.diff Commit message may be: "To compile library which uses TryEnterCriticalSection function, we must define *_WIN32_WINNT* as 0x0400 or later" > >> I attach also patch for win32/config.h with changes required to compile with >> Visual C++ 2005 >> (but I do not know if they are OK also for other compilers under Win32) >> >> > > There is no attachment for this file. > :-) see now Commit message: I do no know :-) : "defines required to successfuly compile on Win32 Visual C++" (only empiric research ... "try - error system" ;-) ) -Laco. > > >>> Sure! >>> >>> Frediano >>> >>> 2014-04-03 9:41 GMT+01:00 LacaK <[email protected]>: >>> >>> >>>> I have resolved these errors. >>>> I have added >>>> - socketpair.c to "replacements" >>>> - #define HAVE_GETADDRINFO 1 in win32/config.h >>>> - add define _WIN32_WINNT=0x0400 to "replacements" >>>> Is it okay? >>>> If I prepare patch for VS C++ project files, do you will accept them ? >>>> Thanks >>>> -Laco. >>>> >>>> >>>> >>>> >>>>> Hi, >>>>> I am trying compile dblib.dll using Microsoft Visual C++ 2005 Express >>>>> I use freetds-master/FreeTDS.sln as starting point (after time I have >>>>> added some missing files) >>>>> But I still can not resolve these errors: >>>>> tds.lib(mem.obj) : error LNK2001: unresolved external symbol >>>>> _tds_freeaddrinfo >>>>> tds.lib(config.obj) : error LNK2001: unresolved external symbol >>>>> _tds_freeaddrinfo >>>>> tds.lib(mem.obj) : error LNK2001: unresolved external symbol >>>>> _tds_socketpair >>>>> tds.lib(config.obj) : error LNK2001: unresolved external symbol >>>>> _tds_getaddrinfo >>>>> tds.lib(net.obj) : error LNK2001: unresolved external symbol >>>>> _tds_getnameinfo >>>>> replacements.lib(win_mutex.obj) : error LNK2001: unresolved external >>>>> symbol _TryEnterCriticalSection >>>>> Any suggestions? >>>>> Thanks >>>>> -Laco. >>>>> >>>>> >> >> --- TDS.vcproj.ori Tue May 27 10:25:16 2014 >> +++ TDS.vcproj Tue May 27 15:23:52 2014 >> @@ -441,6 +441,10 @@ >> > >> </File> >> <File >> + RelativePath=".\sspi.c" >> + > >> + </File> >> + <File >> RelativePath=".\write.c" >> > >> </File> >> >> --- replacements.vcproj.ori Tue May 27 10:25:16 2014 >> +++ replacements.vcproj Tue May 27 15:34:12 2014 >> @@ -349,6 +349,10 @@ >> > >> </File> >> <File >> + RelativePath=".\socketpair.c" >> + > >> + </File> >> + <File >> RelativePath=".\strlcat.c" >> > >> </File> >> @@ -362,6 +366,10 @@ >> </File> >> <File >> RelativePath=".\vasprintf.c" >> + > >> + </File> >> + <File >> + RelativePath=".\win_mutex.c" >> > >> </File> >> </Filter> >> >> --- db-lib.vcproj.ori Tue May 27 10:25:16 2014 >> +++ db-lib.vcproj Tue May 27 15:36:36 2014 >> @@ -301,6 +301,10 @@ >> > >> </File> >> <File >> + RelativePath=".\dbpivot.c" >> + > >> + </File> >> + <File >> RelativePath=".\dbutil.c" >> > >> </File> >> >> _______________________________________________ >> FreeTDS mailing list >> [email protected] >> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds > > _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
replacements.vcproj.diff
(text/plain, 854 B)
--- replacements.vcproj.ori Tue May 27 22:48:08 2014 +++ replacements.vcproj Wed May 28 09:44:16 2014 @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\win32;..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0400" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -168,7 +168,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\win32;..\..\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0400" RuntimeLibrary="0" WarningLevel="3" Detect64BitPortabilityProblems="true"
config.h.diff
(text/plain, 553 B)
--- config.h.ori Tue May 27 10:25:16 2014 +++ config.h Tue May 27 14:37:18 2014 @@ -80,6 +80,7 @@ /* Define to 1 if you have the `gethostname' function. */ #define HAVE_GETHOSTNAME 1 +#define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getpwuid' function. */ /* #undef HAVE_GETPWUID */ @@ -97,7 +98,7 @@ /* #undef HAVE_ICONV */ /* Define to 1 if you have the <inttypes.h> header file. */ -#define HAVE_INTTYPES_H 1 +/* #define HAVE_INTTYPES_H 1 */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1