Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust-encoding failed to compile with rust-msvc_x64 #90

Open
sbant opened this issue Sep 15, 2015 · 4 comments
Open

rust-encoding failed to compile with rust-msvc_x64 #90

sbant opened this issue Sep 15, 2015 · 4 comments

Comments

@sbant
Copy link

sbant commented Sep 15, 2015

libencoding-628a0580477da326.rlib(encoding-628a0580477da326.0.o) : error LNK2019: unresolved external symbol __imp__ZN6euc_kr20BACKWARD_TABLE_UPPER20h7dcfe3eed7745131q6oE referenced in function _ZN6euc_kr8backward20h382884ad758a08bazDpE
libencoding-628a0580477da326.rlib(encoding-628a0580477da326.0.o) : error LNK2019: unresolved external symbol __imp__ZN6euc_kr20BACKWARD_TABLE_LOWER20h7dcfe3eed7745131RlgE referenced in function _ZN6euc_kr8backward20h382884ad758a08bazDpE
libencoding-628a0580477da326.rlib(encoding-628a0580477da326.0.o) : error LNK2019: unresolved external symbol __imp__ZN6euc_kr13FORWARD_TABLE20h7dcfe3eed7745131gaaE referenced in function _ZN6euc_kr7forward20h893f5ab6f8728033rlgE
libencoding-628a0580477da326.rlib(encoding-628a0580477da326.0.o) : error LNK2019: unresolved external symbol __imp__ZN7jis020820BACKWARD_TABLE_UPPER20h8b1de7443deb80aa6MiE referenced in function _ZN7jis02088backward20h25fc7b114b367a7dstjE
libencoding-628a0580477da326.rlib(encoding-628a0580477da326.0.o) : error LNK2019: unresolved external symbol __imp__ZN7jis020820BACKWARD_TABLE_LOWER20h8b1de7443deb80aaT3cE referenced in function _ZN7jis02088backward20h25fc7b114b367a7dstjE
.........

many link errors.

@lifthrasiir
Copy link
Owner

That sounds like a linkage error and not a fault of Encoding. Did you use Cargo with an ordinary dependency or a direct command line to rustc? (AFAIK Cargo does not have MSVC support at the moment, but it might have been changed.)

@sbant
Copy link
Author

sbant commented Sep 18, 2015

sorry, I found may be some problem in RustDT.

In command line,with "cargo build", both gnu and msvc cargo can build the project without problem.

But in RustDT, looks like it will mix the gnu's and msvc's rlib, so there are so many linkage errors.

@therustmonk
Copy link

I have the same problem. Build success, but lib fails on tests (or when I use items from lib in code): https://gist.github.com/DenisKolodin/f45760e6d1883fda0652
I've gist cargo test log with verbose flag.

Cargo calls MS linker.
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\examples\recode.0.o" "/OUT:C:\DEVELOPMENT\rustio\rust-encoding\target\debug\examples\recode.exe" "/OPT:REF,ICF" "/DEBUG" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\libencoding.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_index_singlebyte-d3520d24c050d74f.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_index_korean-6a481ab62fa85cae.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_types-fe8521ccc808562d.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_index_simpchinese-bbf6de1c29d64619.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_index_tradchinese-50f5d4943fa2e14a.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libencoding_index_japanese-504681e476128dbc.rlib" "C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps\libgetopts-bd82d57ca5684ae5.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\libstd-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\libcollections-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\librustc_unicode-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\librand-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\liballoc-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\liballoc_system-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\liblibc-10cbabc2.rlib" "C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib\libcore-10cbabc2.rlib" "/LIBPATH:C:\DEVELOPMENT\rustio\rust-encoding\target\debug" "/LIBPATH:C:\DEVELOPMENT\rustio\rust-encoding\target\debug\deps" "/LIBPATH:C:\Rust\rust-nightly-i686-pc-windows-msvc\bin\rustlib\i686-pc-windows-msvc\lib" "/LIBPATH:C:\DEVELOPMENT\rustio\rust-encoding.rust\bin\i686-pc-windows-msvc" "/LIBPATH:C:\DEVELOPMENT\rustio\rust-encoding\bin\i686-pc-windows-msvc" "ws2_32.lib" "userenv.lib" "advapi32.lib" "kernel32.lib" "shell32.lib" "msvcrt.lib" "compiler-rt.lib"

Other crates compiles with MSVC version without similar errors.
With gnu version that tests was passed. Any ideas how can I help to fix it?

@DoumanAsh
Copy link

JFYI: been playing with this crate, don't see any problem to compile it om msvc compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants