Re: Compiling db-lib using Visual C++ 2005 Express

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4f9RtmUyrAJ7c1bAG248RzLAO=QZH80U7myhQuS4B9j4w@mail.gmail.com>
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

> 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

> 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.

> Thanks
> -Laco.
>

Oh, when you post patches could you please post the comment you want
on the changeset. This would help a lot.

Frediano

>
>> 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.