Skip to Content.
Sympa Menu

freetds - Re: [freetds] Need help with build on Windows

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Velichko Yuriy <velichko.yuriy AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Need help with build on Windows
  • Date: Mon, 18 Apr 2016 18:42:18 +0300

One moe issue.
Now for build on mac.

I build FreeTds for MacOS with:

./configure
make
make install

Than take lib to my project and get link error

Undefined symbols for architecture x86_64:

"___strlcpy_chk", referenced from:
_tdsdbopen in libsybdb_64.a(dblib.o)
_db_env_chg in libsybdb_64.a(dblib.o)
_dbcolinfo in libsybdb_64.a(dblib.o)
_dbtablecolinfo in libsybdb_64.a(dblib.o)
_tds_alloc_dynamic in libsybdb_64.a(mem.o)
_tds7_get_instance_port in libsybdb_64.a(net.o)
_tds_get_locale in libsybdb_64.a(locale.o)
...

​Any ideas? Because I can't find ​this method in sources.


On 18 April 2016 at 13:41, Velichko Yuriy <velichko.yuriy AT gmail.com> wrote:

> Ok, thanks for help!
>
> On 18 April 2016 at 13:34, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>
>> 2016-04-18 11:04 GMT+01:00 Velichko Yuriy <velichko.yuriy AT gmail.com>:
>> > I have tried to use db-lib.lib from AppVeyor archive and got same link
>> > issues.
>> >
>> > So I went back to CMake + Visual Studio + Manual build
>> >
>> > And figure out that need to use replacements.lib too.
>> >
>>
>> Yes, replacements was a library :-)
>>
>> > So if I link my application to
>> >
>> > db-lib.lib
>> > tds.lib
>> > replacements.lib
>> >
>> > the build performs without errors and all works fine.
>> >
>> > So there are few more question:
>> >
>> > 1 why replacements.lib is absent in AppVeyor archive
>>
>> Fixing this. Should be distributed.
>>
>> > 2 I have inherited project that uses SINGLE file db-lib.lib and all
>> works.
>> > But it size much bigger (2.5 Mb for x86). How it can be? may be old
>> version
>> > has such build output?
>>
>> libraries are like simple archive (ie zip files), you can put
>> everything together.
>> For some reason the library you used had everything inside (that's also
>> a reason it was much bigger... or contained more debug information).
>>
>> > 3 It is correct approach to use 3 libs, or there is a way to get a
>> single
>> > file?
>> >
>>
>> It's correct. And I prefer instead of having huge static library but
>> self-contained.
>>
>> Frediano
>>
>> > Regards.
>> >
>> > On 15 April 2016 at 19:44, Velichko Yuriy <velichko.yuriy AT gmail.com>
>> wrote:
>> >
>> >> Thanks Alot!!!
>> >>
>> >> Btw, I think you can include this answer into FreeTDS docs, because it
>> can
>> >> be helpful to users.
>> >>
>> >>
>> >>
>> >> On 15 April 2016 at 18:52, Ramiro Morales <cramm0 AT gmail.com> wrote:
>> >>
>> >>> On Fri, Apr 15, 2016 at 10:29 AM, Velichko Yuriy <
>> >>> velichko.yuriy AT gmail.com>
>> >>> wrote:
>> >>>
>> >>> > Hello!
>> >>> >
>> >>> > I've downloaded the latest version of FreeTDS, configured and
>> builded
>> >>> it
>> >>> > with CMake and Visual Studio 2013.
>> >>> >
>> >>> > I need to use only db-lib as a static library.
>> >>> > So I copied it to the project and linked with it.
>> >>> >
>> >>> > But on building the project I have got link errors like this:
>> >>> >
>> >>> > : unresolved external symbol _tdsdump_open referenced in function
>> >>> > _tdsdbopen
>> >>> > C:\.......\db-lib.lib(dblib.obj)
>> >>> >
>> >>> > I can't find out how to fix this issue.
>> >>> > Help me please! )
>> >>> >
>> >>> > Thanks!
>> >>> >
>> >>>
>> >>>
>> >>> You can download FreeTDS binaries for Windows from AppVeyor (the
>> hosted
>> >>> CI
>> >>> platform used).
>> >>>
>> >>> There is a .zip file available as artifact of every sucessful build.
>> >>>
>> >>> The list of builds:
>> >>> https://ci.appveyor.com/project/FreeTDS/freetds/history
>> >>>
>> >>> You can find there builds of code in the master banch and (from time
>> to
>> >>> time) builds from the post-0.95 release fixes-only Branch-0_95 branch.
>> >>>
>> >>> A recent sucessful build:
>> >>> https://ci.appveyor.com/project/FreeTDS/freetds/build/448
>> >>>
>> >>> Every build matrix element generates its artifact. e.g. for x86_64
>> builds
>> >>> with Visual Studio 2015:
>> >>>
>> >>>
>> https://ci.appveyor.com/project/FreeTDS/freetds/build/448/job/5a8osy4ey1bqir03
>> >>> and the resulting zip file:
>> >>>
>> >>>
>> https://ci.appveyor.com/project/FreeTDS/freetds/build/448/job/5a8osy4ey1bqir03/artifacts
>> >>>
>> >>> I also maintain similar builds of the Branch-0_95 branch at
>> >>> https://github.com/ramiro/freetds/releases
>> >>>
>> >>> If you don't want or can't use binaries built by third parties then
>> the
>> >>> appveyor.yml file and associated files (find them on the source tree)
>> can
>> >>> be of help as a source of information and experience to avoid common
>> >>> pitfalls/pain points when building FreeTDS on Windows.
>> >>>
>> >>> HTH
>> >>>
>> >>>
>> >>> --
>> >>> Ramiro Morales
>> >>> @ramiromorales
>> >>> _______________________________________________
>> >>> 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
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
>
>
> --
> ​С уважением, Величко Юрий.
>



--
​С уважением, Величко Юрий.




Archive powered by MHonArc 2.6.24.

Top of Page