On May 8, 7:46 pm, "jason" <ja...@njkfrudils.plus.com> wrote: > ----- Original Message ----- > From: "Cactus" <rieman...@gmail.com> > To: "mpir-devel" <mpir-devel@googlegroups.com> > Sent: Sunday, May 08, 2011 5:50 PM > Subject: [mpir-devel] Re: MSVC command line build > > On May 8, 5:31 pm, Cactus <rieman...@gmail.com> wrote: > > On May 8, 5:11 pm, jason <ja...@njkfrudils.plus.com> wrote: > > > > On May 8, 4:29 pm, Cactus <rieman...@gmail.com> wrote: > > > > > On May 8, 4:05 pm, jason <ja...@njkfrudils.plus.com> wrote: > > > > > > Hi > > > > > > here the flags for a 64bit static build > > > > > > Setting environment for using Microsoft Visual Studio 2008 Beta2 x64 > > > > > tools. > > > > > setting params to > > > > > (set LIBTYPE=lib) > > > > > (set FLAGS=/Ox /Ot /D "NDEBUG" /D "HAVE_CONFIG_H" /nologo /D "_MBCS" > > > > > / > > > > > GS-) > > > > > (set FLAGS1=/Oi /D "_LIB" /D "PIC" /MT) > > > > > (set MPNPATH=x86_64w x86_64w\nehalem) > > > > > (set ABI=64) > > > > > > The static build is fine , but I'm having problems with the > > > > > shared(DLL) build , heres the flags > > > > > > setting params to > > > > > (set LIBTYPE=dll) > > > > > (set FLAGS=/Ox /Ot /D "NDEBUG" /D "HAVE_CONFIG_H" /nologo /D "_MBCS" > > > > > / > > > > > GS-) > > > > > (set FLAGS1=/D "__GMP_LIBGMP_DLL" /D "__GMP_WITHIN_GMP" /D > > > > > "__GMP_WITHIN_GMPXX" > > > > > /D "_WINDLL" /GF /EHsc /MD) > > > > > (set MPNPATH=x86_64w x86_64w\nehalem) > > > > > (set ABI=64) > > > > > > and make appears to be OK and ends with > > > > > > osmpq.cc > > > > > osmpz.cc > > > > > Creating library mpir.lib and object mpir.exp > > > > > Creating library mpirxx.lib and object mpirxx.exp > > > > > > however make check fails with > > > > > > memory.c > > > > > misc.c > > > > > trace.c > > > > > refmpn.c > > > > > refmpz.c > > > > > refmpq.c > > > > > refmpf.c > > > > > spinner.c > > > > > getopt.c > > > > > t-bswap.c > > > > > misc.obj : error LNK2019: unresolved external symbol __gmp_rands > > > > > referenced in f > > > > > unction tests_rand_start > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_rands_initialized ref > > > > > erenced in function tests_rand_start > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_allocate_func referen > > > > > ced in function __gmp_allocate_func_aligned > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_reallocate_func refer > > > > > enced in function __gmp_allocate_or_reallocate > > > > > misc.obj : error LNK2019: unresolved external symbol __gmpn_copyi > > > > > referenced in > > > > > function mpz_set_n > > > > > refmpn.obj : error LNK2019: unresolved external symbol > > > > > __gmp_modlimb_invert_tabl > > > > > e referenced in function refmpn_divrem_hensel_qr_1 > > > > > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_mul_1 > > > > > referenced i > > > > > n function refmpn_mulmid_basecase > > > > > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_bases > > > > > referenced i > > > > > n function refmpn_get_str > > > > > refmpn.obj : error LNK2019: unresolved external symbol > > > > > __gmpn_clz_tab > > > > > referenced > > > > > in function refmpn_get_str > > > > > t-bswap.exe : fatal error LNK1120: 9 unresolved externals > > > > > ..\..\tests\t-bswap.c FAILS > > > > > t-constants.c > > > > > t-constants.obj : error LNK2019: unresolved external symbol > > > > > __gmp_modlimb_invert > > > > > _table referenced in function main > > > > > refmpn.obj : error LNK2001: unresolved external symbol > > > > > __gmp_modlimb_invert_tabl > > > > > e > > > > > t-constants.obj : error LNK2019: unresolved external symbol > > > > > __gmp_bits_per_limb > > > > > referenced in function main > > > > > misc.obj : error LNK2019: unresolved external symbol __gmp_rands > > > > > referenced in f > > > > > unction tests_rand_start > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_rands_initialized ref > > > > > erenced in function tests_rand_start > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_allocate_func referen > > > > > ced in function __gmp_allocate_func_aligned > > > > > misc.obj : error LNK2019: unresolved external symbol > > > > > __gmp_reallocate_func refer > > > > > enced in function __gmp_allocate_or_reallocate > > > > > misc.obj : error LNK2019: unresolved external symbol __gmpn_copyi > > > > > referenced in > > > > > function mpz_set_n > > > > > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_mul_1 > > > > > referenced i > > > > > n function refmpn_mulmid_basecase > > > > > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_bases > > > > > referenced i > > > > > n function refmpn_get_str > > > > > refmpn.obj : error LNK2019: unresolved external symbol > > > > > __gmpn_clz_tab > > > > > referenced > > > > > in function refmpn_get_str > > > > > t-constants.exe : fatal error LNK1120: 10 unresolved externals > > > > > > etc > > > > > > I assume my flags are wrong , or perhaps how I build and link it , > > > > > the > > > > > exact details are in svn:trunk/win/make.bat but it basically goes > > > > > like > > > > > this > > > > > > source c files compiled with > > > > > cl FLAGS FLAGS1 /c > > > > > dll linked with > > > > > link /DLL /NODEFAULTLIB:LIBCMT.lib /nologo *.obj /out:mpir.dll > > > > > > test c files compiled with same flags and flags1 with > > > > > cl tests.c *.obj /link mpir.lib > > > > > where the *.obj are the refmpn refmpz files > > > > > > Anyone know what I am doing wrong > > > > > > Thanks > > > > > Jason > > > > > I think the missing symbols are exported DLL data (for example a > > > > function pointer holding an address of a function). > > > > > Try adding the compiler option /DLL > > > > > Brian- Hide quoted text - > > > > > - Show quoted text - > > > > No , doesn't help , same errors > > > > Thanks > > > Jason > > > Have you added defines for YASM? > > > static: _WIN64_ABI > > DLL: DLL;_WIN64_ABI > > > Brian > > You don't need the _WIN64_ABI (its a hangover from earlier times) but > the DLL matters in DLL builds. > > Brian > > -- > You received this message because you are subscribed to the Google Groups > "mpir-devel" group. > To post to this group, send email to mpir-devel@googlegroups.com. > To unsubscribe from this group, send email to > mpir-devel+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/mpir-devel?hl=en. > > cheers , adding -D DLL to the yasm flags helps , but we still have 7 errors > instead of 9 , > > memory.c > misc.c > trace.c > refmpn.c > refmpz.c > refmpq.c > refmpf.c > spinner.c > getopt.c > t-bswap.c > misc.obj : error LNK2019: unresolved external symbol __gmp_rands referenced > in f > unction tests_rand_start > misc.obj : error LNK2019: unresolved external symbol __gmp_rands_initialized > ref > erenced in function tests_rand_start > misc.obj : error LNK2019: unresolved external symbol __gmp_allocate_func > referen > ced in function __gmp_allocate_func_aligned > misc.obj : error LNK2019: unresolved external symbol __gmp_reallocate_func > refer > enced in function __gmp_allocate_or_reallocate > refmpn.obj : error LNK2019: unresolved external symbol > __gmp_modlimb_invert_tabl > e referenced in function refmpn_divrem_hensel_qr_1 > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_bases > referenced i > n function refmpn_get_str > refmpn.obj : error LNK2019: unresolved external symbol __gmpn_clz_tab > referenced > in function refmpn_get_str > t-bswap.exe : fatal error LNK1120: 7 unresolved externals > ..\..\tests\t-bswap.c FAILS > t-constants.c > > the above c files are all built with the same flags which does include /D > DLL > > Thanks > Jason
Do you define __GMP_LIBGMP_DLL when building the tests if a DLL is being tested? Brian -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to mpir-devel@googlegroups.com. To unsubscribe from this group, send email to mpir-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.