search for: nodefaultlib

Displaying 20 results from an estimated 102 matches for "nodefaultlib".

2003 Jun 16
2
using win32 static libs
...efined in msvcrt.lib(cinitexe.obj) OggVorbisTest error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj) OggVorbisTest error LNK2005: __setmbcp already defined in libcmt.lib(mbctype.obj) OggVorbisTest warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library OggVorbisTest warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library OggVorbisTest fatal error LNK1169: one or more multiply defined symbols found ---------------------------------------------------------------------- i've tried the...
2019 Feb 27
2
lld-link crash when linking intrinsics lib
...ld toolchain for Uefi firmware. Below is a simplified example (main.c and intrinsics.c). Uefi firmware is self-contained and doesn't depend on the compiler intrinsics implementation, so we have our own intrinsics lib. It is weird that if I don't use the llvm-lib but directly "lld-link /NODEFAULTLIB /ENTRY:main main.obj intrinsics.obj", the below example can pass link. Please advise what's wrong in this example. $ cat main.c typedef struct { struct MAP_LIST { unsigned long long VirtualAddress; void *MapCookie; } MapList[100]; } SNP_DRIVER; SNP_DRIVER snp_i...
2019 Feb 28
4
lld-link crash when linking intrinsics lib
...Below is a simplified example (main.c and >> intrinsics.c). >> >> Uefi firmware is self-contained and doesn’t depend on the compiler >> intrinsics implementation, so we have our own intrinsics lib. It is weird >> that if I don’t use the llvm-lib but directly “lld-link /NODEFAULTLIB >> /ENTRY:main main.obj intrinsics.obj”, the below example can pass link. >> Please advise what’s wrong in this example. >> >> >> >> >> >> $ cat main.c >> >> typedef struct { >> >> struct MAP_LIST { >> >> uns...
2019 Feb 18
2
lld-link fails to link 32bits assembly functions but 64bits pass
...global Foo Foo: Ret 64bits compiling and linking is successful: $ nasm foo.nasm -Ox -f win64 -g -o foo.obj $ ~/llvm/releaseinstall/bin/clang-cl main.c /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /EHs-c- /GR- /GF /Gy /Zi /Gw -m64 $ ~/llvm/releaseinstall/bin/lld-link main.obj foo.obj /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /DLL /ENTRY:main /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER: /DEBUG:GHASH /Machine:X64 But 32bits linking fails with error of Foo assembly function is a undefined symbol: $ nasm foo.nasm -Ox -f win3...
2013 Sep 29
2
MSVS: debug flac.exe uses release libogg_static.lib
With current settings, MSVS links debug version of flac.exe (and other .exe and .dll files) with the release version of libogg_static.lib. MSVS issues a "warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library" What's the reason in this setting? What is better: * to change the settings so that MSVS will link debug .exe files with the debug version of libogg_static.lib, or * to add libcmt.lib into "IgnoreDefaultLibraryNames" option in the same way as it was done for libFLAC_dy...
2004 Aug 06
4
compile speexenc
Hello, Iam being to compile speexenc but I have the following error: LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library libspeex.lib(lsp.obj) : error LNK2001: unresolved external symbol _spx_cos Debug/speexenc.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Please, help me Guillaume --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xip...
2017 Jun 08
2
Failing unit tests
...ltins-i386-linux :: divsc3_test.c (4326 of 37268) ******************** TEST 'Builtins-i386-linux :: divsc3_test.c' FAILED ******************** Script: -- ~/workspace/LLVM/ninjacmake/./bin/clang -gline-tables-only -m32 -fno-builtin -I ~/workspace/LLVM/llvm/projects/compiler-rt/lib/builtins -nodefaultlibs ~/workspace/LLVM/llvm/projects/compiler-rt/test/builtins/Unit/divsc3_test.c ~/workspace/LLVM/ninjacmake/./lib/clang/5.0.0/lib/linux/libclang_rt.builtins-i386.a -lc -lm -lm -o ~/workspace/LLVM/ninjacmake/projects/compiler-rt/test/builtins/Unit/I386LinuxConfig/Output/divsc3_test.c.tmp && ~/...
2017 Jun 14
2
Using LLD to create a .lib from a .def
...l Force = false; bool Debug = false; bool WriteSymtab = true; unsigned DebugTypes = static_cast<unsigned>(DebugType::None); StringRef PDBPath; // Symbols in this set are considered as live by the garbage collector. std::set<SymbolBody *> GCRoot; std::set<StringRef> NoDefaultLibs; bool NoDefaultLibAll = false; // True if we are creating a DLL. bool DLL = false; StringRef Implib; std::vector<Export> Exports; std::set<std::string> DelayLoads; std::map<std::string, int> DLLOrder; SymbolBody *DelayLoadHelper = nullptr; // Used for SafeSEH....
2004 Aug 06
2
compiling in windows
...LIBCD.lib(dbgheap.obj)MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:libraryDebug/speexenc.exe : fatal error LNK1169: one or more multiply defined symbols foundError executing link.exe. If I ignore msvcrtd.lib I get this error:Linking...LINK : warning LNK4049: locally defined symbol "_malloc" importedLINK : warning LNK4049: locally defined symbol "_fr...
2017 Jun 04
2
trying to get a minimal windows program linked with lld
...ess(0); } I use mingw-w64 like this: gcc -c test.c Create kernel32.def: EXPORTS ExitProcess GetStdHandle WriteFile Use dlltool to create kernel32.lib: dlltool -d kernel32.def -l kernel32.lib Then link with lld-link: lld-link -NOLOGO -SUBSYSTEM:console test.o kernel32.lib -OUT:test.exe -NODEFAULTLIB -ENTRY:_start This succeeds, but then I get a segfault when running test.exe. When I step through the code, what's happening is it's getting to 140005068: ff 25 ce cf ff ff jmpq *-0x3032(%rip) # 0x14000203c which is trying to jump into .idata section where presumably t...
2007 Feb 28
1
Linking problem when using speex with visual studio 6.0
Hi, dear all I got the following problem when using speex1.2beta1 with VS 6.0: LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library libspeex.lib(sb_celp.obj) : error LNK2001: unresolved external symbol _lpc_window libspeex.lib(nb_celp.obj) : error LNK2001: unresolved external symbol _lpc_window I compiled speex1.2beta1 under win32 directory and got the libspeex.lib, however, when I call speex_encoder_init() the above...
2008 Apr 16
1
C++ Linker Warnings
Hi, I have been trying to link to theora static libs I built with VC++ 2005 from libtheora-1.0beta2 and libogg-1.1.3. I get a couple of link warnings, the most significant is: LINK : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library I read up about libcmt.lib and found it is a statically linked library that supports multithreaded programs. It is linked to by default for multithreaded (MT[d]). I am actually using Multithreaded DLL (MD[d]) but by including <stream> in my program the libcmt.lib is automatically...
2013 Sep 29
2
MSVS: debug flac.exe uses release libogg_static.lib
...ph Giles wrote: >> With current settings, MSVS links debug version of flac.exe (and other >> .exe and .dll files) with the release version of libogg_static.lib. >> MSVS issues a "warning LNK4098: defaultlib 'libcmt.lib' conflicts with use >> of other libs; use /NODEFAULTLIB:library" > > Sounds like a bug. Debug targets should link to debug builds of their > dependencies to simplify debugging. I agree, but according to README (section "Building with MSVC"): user builds libogg_static.lib separately, and then copies the file to flac\objs\release\...
2002 Feb 07
1
Vorbisfile Linker Question
...ib(dbgheap.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _memmove already defined in libcmtd.lib(memmove.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in libcmtd.lib(dbgheap.obj) LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library .\WinDebug/Game.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. I've read some of the discussions on this issue before, and I made sure to check all the settings that have been mentioned (Single vs Multi threaded, Multithreaded DLL vs Mul...
2017 Sep 30
2
invalid code generated on Windows x86_64 using skylake-specific features
...FFFFFFF. The disassembly of the crashed instruction is: 00007FF7C9913BA7 vmovdqa xmmword ptr [rbp-20h],xmm0 There is no callstack or source in the MSVC debugger. The .pdb produced is 64KB exactly. The file was linked with: lld -NOLOGO -DEBUG -MACHINE:X64 /SUBSYSTEM:console -OUT:.\test.exe -NODEFAULTLIB -ENTRY:_start ./zig-cache/test.obj ./zig-cache/builtin.obj ./zig-cache/compiler_rt.obj ./zig-cache/kernel32.lib When I change the call to LLVMCreateTargetMachine so that both target_specific_cpu_args and target_specific_features are the empty string, the produced binary is valid and runs succes...
2017 Jun 15
2
Using LLD to create a .lib from a .def
...rue; >> unsigned DebugTypes = static_cast<unsigned>(DebugType::None); >> StringRef PDBPath; >> >> // Symbols in this set are considered as live by the garbage collector. >> std::set<SymbolBody *> GCRoot; >> >> std::set<StringRef> NoDefaultLibs; >> bool NoDefaultLibAll = false; >> >> // True if we are creating a DLL. >> bool DLL = false; >> StringRef Implib; >> std::vector<Export> Exports; >> std::set<std::string> DelayLoads; >> std::map<std::string, int> DLL...
2010 Aug 05
2
[LLVMdev] [PATCH] Capability of Win32.DLL with ENABLE_SHARED
...T _\([^.][^.]*\)$$/\1/p" \ + -e "s/^.* [BDR] _\([^.][^.]*\)$$/\1 DATA/p" \ + $(SHLIB_FRAGS) \ + | sort -u) > $@ + +$(ObjDir)/$(LIBRARYNAME).a.o: $(LLVMLibsPaths) $(ObjDir)/.dir + $(Echo) Linking all LLVMLibs together for $(LIBRARYNAME) + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive $(LLVMLibsPaths) \ + -Wl,--no-whole-archive + +$(ObjDir)/stdc++.a.o: $(ObjDir)/.dir + $(Echo) Linking all libs together for static libstdc++.a + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive -lstdc++ \ + -Wl,--no-whole-archi...
2017 Jun 16
2
Using LLD to create a .lib from a .def
...(DebugType::None); >>>> StringRef PDBPath; >>>> >>>> // Symbols in this set are considered as live by the garbage >>>> collector. >>>> std::set<SymbolBody *> GCRoot; >>>> >>>> std::set<StringRef> NoDefaultLibs; >>>> bool NoDefaultLibAll = false; >>>> >>>> // True if we are creating a DLL. >>>> bool DLL = false; >>>> StringRef Implib; >>>> std::vector<Export> Exports; >>>> std::set<std::string> Del...
2002 Jun 24
1
Date: Tue, 25 Jun 2002 00:06:12 +0300
....lib(fclose.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj) LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library Debug/vorbis_test.exe : fatal error LNK1169: one or more multiply defined symbols found <p>While it is compiling fine using release libs. What is the problem? Thanks for any help. -- Best regards, GIE <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg proje...
2019 Mar 18
2
RFC: ELF Autolinking
...-2017 > . > > MSVC rules for resolving symbols from libraries: A library specified with > /DEFAULTLIB is searched after libraries specified explicitly on the command > line and before default libraries named in .obj files (see > https://docs.microsoft.com/en-us/cpp/build/reference/nodefaultlib-ignore-libraries?view=vs-2017 > ). > > MSVC allows passing not only libraries to the linker via pragams but also > a subset of the linkers command line options ( > https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp). In > addition to the documented options MSVC also a...