Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #102512
| From | Michael Holiday <Mike@example.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | C tools for perl |
| Date | 2017-01-26 23:30 -0800 |
| Message-ID | <ef0b82Fs5m6U1@mid.individual.net> (permalink) |
| References | (1 earlier) <ec1aqfFbv20U1@mid.individual.net> <ec1ockFf411U1@mid.individual.net> <o3h1og$1uk$2@dont-email.me> <ec9hs7Faj8dU1@mid.individual.net> <o3o8mq$m8l$1@dont-email.me> |
On 12/25/2016 2:58 AM, jacobnavia wrote: [OP snips, updates subject] >> xs\\LongPath.xs: In function `XS_Win32__LongPath_find_close': >> xs\\LongPath.xs:179: warning: cast to pointer from integer of different >> size >> ... 2 more similar warnings >> g++ LongPath.def -o blib\arch\auto\Win32\LongPath\LongPath.xs.dll -mdll >> -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" -static-libgcc >> -static-libstdc++ xs/LongPath.o "C:\STRAWB~1\perl\lib\CORE\libperl524.a" >> -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 >> -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm >> -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base >> g++.exe: unrecognized option `-static-libstdc++' >> xs/LongPath.o:LongPath.c:(.text+0xef): undefined reference to >> `_imp__Perl_sv_2pv_flags' >> ... 100 similar lines > > This [means] that the library that contains "Perl_sv_2pv_flags" is not > included in the link, or you are using an older version of that import > library that doesn't contain that symbol. Verify your perl import > libraries. I've done my best with this, including ripping out everything I had and replacing it anew. Perl scripts work, but C doesn't link. Ian (Collins) advises that the following is relevant: C:\Users\Fred\Documents>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=C:/Strawberry/c/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.2/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-4.9.2/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-sjlj-exceptions --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/opt/build/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/opt/build/prerequisites/x86_64-w64-mingw32-static --with-mpc=/opt/build/prerequisites/x86_64-w64-mingw32-static --with-isl=/opt/build/prerequisites/x86_64-w64-mingw32-static --with-cloog=/opt/build/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x86_64-posix-sjlj, built by strawberryperl.com project' CFLAGS='-O2 -pipe -I/opt/build/x86_64-492-posix-sjlj-rt_v402/mingw64/opt/include -I/opt/build/prerequisites/x86_64-zlib-static/include -I/opt/build/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/opt/build/x86_64-492-posix-sjlj-rt_v402/mingw64/opt/include -I/opt/build/prerequisites/x86_64-zlib-static/include -I/opt/build/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/opt/build/x86_64-492-posix-sjlj-rt_v402/mingw64/opt/lib -L/opt/build/prerequisites/x86_64-zlib-static/lib -L/opt/build/prerequisites/x86_64-w64-mingw32-static/lib ' Thread model: posix gcc version 4.9.2 (x86_64-posix-sjlj, built by strawberryperl.com project) C:\Users\Fred\Documents> At the outside, this is two weeks old. We've had something called a pineapple express flatten our fair metropolis, which is why I decided to deal with the C aspects of this, and perl is C just right under the hood. I like that about being a perl, because I know it's going to resolve to C at some point. C:\Users\Fred\Documents>gcc deque.c C:\Users\Fred\AppData\Local\Temp\ccEXIKGX.o:deque.c:(.text+0x8e): undefined reference to `DLAddBefore' ... C:\Users\Fred\AppData\Local\Temp\ccEXIKGX.o:deque.c:(.text+0x63a): undefined reference to `DLDestroy' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x25): undefined reference to `WinMain' collect2.exe: error: ld returned 1 exit status I'm frankly embarrassed by this. It was much easier to have MS's development tools whilst working on windows. Linking happens magically, with glitz and splendor. Cross-compilation is fraught. BartC asks us whether we're programmers. I'm not, unless I have a C compiler that I can query through standard C, which, I assume heathfield's program is. There will be a name collision on the word "library." Perl has this notion of a lib as a directory where files are found. In this implementation, it follows the -l notion. Can someone tell me what this means? CPPFLAGS= LDFLAGS='-pipe -L/opt/build/x86_64-492-posix-sjlj-rt_v402/mingw64/opt/lib -L/opt/build/prerequisites/x86_64-zlib-static/lib -L/opt/build/prerequisites/x86_64-w64-mingw32-static/lib ' > Verify your perl import libraries. Have I done so? -- Michael Holiday
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
altering winbase.h Michael Holiday <Mike@example.invalid> - 2016-12-21 21:54 -0800
Re: altering winbase.h Michael Holiday <Mike@example.invalid> - 2016-12-21 22:40 -0800
Re: altering winbase.h jacobnavia <jacob@jacob.remcomp.fr> - 2016-12-22 09:24 +0100
Re: altering winbase.h Michael Holiday <Mike@example.invalid> - 2016-12-22 02:37 -0800
Re: altering winbase.h jacobnavia <jacob@jacob.remcomp.fr> - 2016-12-22 18:12 +0100
Re: altering winbase.h Michael Holiday <Mike@example.invalid> - 2016-12-22 02:31 -0800
Re: altering winbase.h jacobnavia <jacob@jacob.remcomp.fr> - 2016-12-22 18:17 +0100
Re: altering winbase.h Michael Holiday <Mike@example.invalid> - 2016-12-25 01:29 -0800
Re: altering winbase.h jacobnavia <jacob@jacob.remcomp.fr> - 2016-12-25 11:58 +0100
C tools for perl Michael Holiday <Mike@example.invalid> - 2017-01-26 23:30 -0800
Re: altering winbase.h Keith Thompson <kst-u@mib.org> - 2016-12-25 12:17 -0800
Re: altering winbase.h jacobnavia <jacob@jacob.remcomp.fr> - 2016-12-25 22:46 +0100
Re: altering winbase.h Keith Thompson <kst-u@mib.org> - 2016-12-25 15:17 -0800
csiph-web