[freetds] Compiling db-lib using Visual C++ 2005 Express

LacaK lacak at zoznam.sk
Wed May 28 04:11:51 EDT 2014


Frediano Ziglio  wrote / napísal(a):
> 2014-05-27 14:55 GMT+01:00 LacaK <lacak at zoznam.sk>:
>   
>> 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 <lacak at zoznam.sk>:
>>>
>>>       
>>>> 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
>> FreeTDS at lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>>     
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: replacements.vcproj.diff
URL: <http://lists.ibiblio.org/pipermail/freetds/attachments/20140528/a0f405dc/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.h.diff
URL: <http://lists.ibiblio.org/pipermail/freetds/attachments/20140528/a0f405dc/attachment-0001.ksh>


More information about the FreeTDS mailing list