Re: Communication methods
Hi. Thanks for the tip, any idea if the plain UNIX pipes are working with protobuf? Regards. 2009/5/25 Christopher Smith cbsm...@gmail.com http://code.google.com/p/protobuf/wiki/RPCImplementations On Sun, May 24, 2009 at 12:42 PM, SyRenity stas.os...@gmail.com wrote: Hi. Sorry if this was already asked in the past, but does Protocol Buffers provide some IPC communication methods? Or they provide the data encapsulation, and I should use any method I want? Regards. -- Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
Problem with linking runtime libraries on Windows for C++
Hi, I am trying to use Google Protocol Buffers run time libraries in my application. To use Protocol Buffers, I need to first build the run- time libraries for C++ on Windows. I am using Visual Studio 2003. While linking the libraries into my application I get the following errors. Can anyone help me figure out what might be the issue? libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function int __cdecl google::protobuf::io::`anonymous namespace'::close_no_eintr(int) (? close_no_ei...@? a0x29e80...@io@proto...@google@@y...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read (void *,int) (? r...@copyingfileinputstream@fileinputstr...@io@proto...@google@@uaehp...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write (void const *,int) (? wr...@copyingfileoutputstream@fileoutputstr...@io@proto...@google@@uae_np...@z) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
/usr/include/google/protobuf/stubs/once.h: undefined reference to `pthread_once'
Hi all, I'm just having some errors when compiling my first .proto file. I made the .proto and compile it with protoc and all goes excellent. Then I import the .c and .h files into my C++ project and when I compile all together I receive the error of the subject of this mail. My system is a gentoo linux with gcc version 4.2.4-r1 p1.1 and I'm using Eclipse (of course I added the protobuf to the list of libraries needed to compile the project). This is the output of emerge --info: Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.10.1-r0, 2.6.22 i686) = System Settings = System uname: Linux-2.6.22-i686-Intel-R-_Core- tm-2_duo_cpu_t71...@_1.80ghz-with-gentoo-2.0.1 Timestamp of tree: Thu, 04 Jun 2009 01:00:02 + app-shells/bash: 4.0_p24 dev-java/java-config: 1.3.7-r1, 2.1.8 dev-lang/python: 2.4.4-r14, 2.5.4-r2, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox:1.9 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.29 ACCEPT_KEYWORDS=x86 ~x86 CBUILD=i686-pc-linux-gnu CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu CONFIG_PROTECT=/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/ kde/3.5/shutdown /usr/share/config /usr/share/cursors/xorg-x11/ default /var/lib/hsqldb CONFIG_PROTECT_MASK=/etc/ca-certificates.conf /etc/env.d /etc/env.d/ java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/ gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/ texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d / etc/texmf/web2c /etc/udev/rules.d CXXFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=cvs distlocks fixpackages keeptemp keepwork parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox GENTOO_MIRRORS=ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/ gentoo LANG=es_ES.utf8 LC_ALL=es_ES.utf8 LDFLAGS=-Wl,-O1 LINGUAS=es en de MAKEOPTS=-j3 PKGDIR=/usr/portage/packages PORTAGE_CONFIGROOT=/ PORTAGE_RSYNC_OPTS=--recursive --links --safe-links --perms --times -- compress --force --whole-file --delete --stats --timeout=180 -- exclude=/distfiles --exclude=/local --exclude=/packages PORTAGE_TMPDIR=/var/tmp PORTDIR=/usr/portage PORTDIR_OVERLAY=/usr/local/portage/layman/gnome /usr/local/portage/ layman/sunrise /usr/local/portage/layman/desktop-effects SYNC=rsync://rsync.gentoo.org/gentoo-portage USE=X aac acl acpi alsa berkdb bluetooth branding browserplugin bzip2 cairo cdparanoia cdr cli cracklib crypt cups dbus divx4linux dri dts dv dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox font- server fortran gdbm gif gnome gnomedb gpm gstreamer gtk gtk2 hal iconv ieee1394 isdnlog java jpeg ldap libnotify mad matroska midi mikmod mmx mono mp3 mpeg msn mudflap ncurses nls nptl nptlonly offensive ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sdk sdl session spell spl sse ssl startup-notification svg sysfs tcpd theora tiff truetype unicode usb userlocales v4l2 vorbis win32codecs wmf x86 xinerama xml xorg xprint xulrunner xv xvid zlib ALSA_CARDS=hda-intel ALSA_PCM_PLUGINS=adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol APACHE2_MODULES=actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias ELIBC=glibc INPUT_DEVICES=keyboard mouse KERNEL=linux LCD_DEVICES=bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text LINGUAS=es en de USERLAND=GNU VIDEO_CARDS=fbdev vesa fglrx Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS What I'm doing wrong? Thanks in advance and best regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en
Re: /usr/include/google/protobuf/stubs/once.h: undefined reference to `pthread_once'
sounds like linking the pthread library is missing. Add -lpthread to your linker options. On Thu, Jun 4, 2009 at 1:27 PM, Carmen carmen.navarr...@gmail.com wrote: Hi all, I'm just having some errors when compiling my first .proto file. I made the .proto and compile it with protoc and all goes excellent. Then I import the .c and .h files into my C++ project and when I compile all together I receive the error of the subject of this mail. My system is a gentoo linux with gcc version 4.2.4-r1 p1.1 and I'm using Eclipse (of course I added the protobuf to the list of libraries needed to compile the project). This is the output of emerge --info: Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.10.1-r0, 2.6.22 i686) = System Settings = System uname: Linux-2.6.22-i686-Intel-R-_Core- tm-2_duo_cpu_t71...@_1.80ghz-with-gentoo-2.0.1 Timestamp of tree: Thu, 04 Jun 2009 01:00:02 + app-shells/bash: 4.0_p24 dev-java/java-config: 1.3.7-r1, 2.1.8 dev-lang/python: 2.4.4-r14, 2.5.4-r2, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.9 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.29 ACCEPT_KEYWORDS=x86 ~x86 CBUILD=i686-pc-linux-gnu CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu CONFIG_PROTECT=/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/ kde/3.5/shutdown /usr/share/config /usr/share/cursors/xorg-x11/ default /var/lib/hsqldb CONFIG_PROTECT_MASK=/etc/ca-certificates.conf /etc/env.d /etc/env.d/ java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/ gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/ texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d / etc/texmf/web2c /etc/udev/rules.d CXXFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=cvs distlocks fixpackages keeptemp keepwork parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox GENTOO_MIRRORS=ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/ gentoo LANG=es_ES.utf8 LC_ALL=es_ES.utf8 LDFLAGS=-Wl,-O1 LINGUAS=es en de MAKEOPTS=-j3 PKGDIR=/usr/portage/packages PORTAGE_CONFIGROOT=/ PORTAGE_RSYNC_OPTS=--recursive --links --safe-links --perms --times -- compress --force --whole-file --delete --stats --timeout=180 -- exclude=/distfiles --exclude=/local --exclude=/packages PORTAGE_TMPDIR=/var/tmp PORTDIR=/usr/portage PORTDIR_OVERLAY=/usr/local/portage/layman/gnome /usr/local/portage/ layman/sunrise /usr/local/portage/layman/desktop-effects SYNC=rsync://rsync.gentoo.org/gentoo-portage USE=X aac acl acpi alsa berkdb bluetooth branding browserplugin bzip2 cairo cdparanoia cdr cli cracklib crypt cups dbus divx4linux dri dts dv dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox font- server fortran gdbm gif gnome gnomedb gpm gstreamer gtk gtk2 hal iconv ieee1394 isdnlog java jpeg ldap libnotify mad matroska midi mikmod mmx mono mp3 mpeg msn mudflap ncurses nls nptl nptlonly offensive ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sdk sdl session spell spl sse ssl startup-notification svg sysfs tcpd theora tiff truetype unicode usb userlocales v4l2 vorbis win32codecs wmf x86 xinerama xml xorg xprint xulrunner xv xvid zlib ALSA_CARDS=hda-intel ALSA_PCM_PLUGINS=adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol APACHE2_MODULES=actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias ELIBC=glibc INPUT_DEVICES=keyboard mouse KERNEL=linux LCD_DEVICES=bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text LINGUAS=es en de USERLAND=GNU VIDEO_CARDS=fbdev vesa fglrx Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS What I'm doing wrong? Thanks in advance and best regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to
Re: Sun Studio 11
Thanks for the patch! It looks like you were using the examples as a test. Running make check in the top directory will run a much better suite of tests -- do they pass? Assuming it does work, can you re-send that patch as an attachment (it looks like it has been mangled), or even send it to me via codereview.appspot.com? Also, for me to submit it you'll need to sign the contributor license agreement: http://code.google.com/legal/individual-cla-v1.0.html -- if you own copyright on this patch http://code.google.com/legal/corporate-cla-v1.0.html -- if your employer does On Wed, Jun 3, 2009 at 10:53 PM, bmcarnes_proto...@oddren.com wrote: Probably not. LibCstd isn't complete enough for protobuf. I was able to get protobuf 2.1.0 to work well under Sun Studio 11, using libCstd, with a few patches. Works well enough to compile and run the add_person_cpp/list_people_cpp examples. I include the build instructions and patch set below Also included are patches to the examples makefile to test it out. Apply below patchset first against protobuf 2.1.0 $ CXX=CC CC=cc ./configure --disable-shared $ make $ cd examples $ make cpp $ ./add_person_cpp addressbook.test (enter a test record) $ ./list_people_cpp addressbook.test (test record is displayed correctly) $ ldd list_people_cpp (or ldd add_person_cpp ) libpthread.so.1 = /lib/libpthread.so.1 libCstd.so.1 = /usr/lib/libCstd.so.1 libCrun.so.1 = /usr/lib/libCrun.so.1 libm.so.2 = /lib/libm.so.2 libc.so.1 = /lib/libc.so.1 Index: src/google/protobuf/repeated_field.h === --- src/google/protobuf/repeated_field.h(revision 2) +++ src/google/protobuf/repeated_field.h(working copy) @@ -69,7 +69,7 @@ class LIBPROTOBUF_EXPORT GenericRepeatedField { public: inline GenericRepeatedField() {} -#if defined(__DECCXX) defined(__osf__) +#if defined(__SUNPRO_CC) || defined(__DECCXX) defined(__osf__) // HP C++ on Tru64 has trouble when this is not defined inline. virtual ~GenericRepeatedField() {} #else @@ -548,7 +548,7 @@ current_size_ = 0; } -#if defined(__DECCXX) defined(__osf__) +#if defined(__SUNPRO_CC) || defined(__DECCXX) defined(__osf__) // HP C++ on Tru64 has trouble when this is not defined inline. template inline void RepeatedPtrFieldstring::Clear() { Index: src/google/protobuf/descriptor_database.cc === --- src/google/protobuf/descriptor_database.cc (revision 2) +++ src/google/protobuf/descriptor_database.cc (working copy) @@ -127,7 +127,13 @@ // Insert the new symbol using the iterator as a hint, the new entry will // appear immediately before the one the iterator is pointing at. + + // Sun Studio 11 needs a little help here +#if defined(__SUNPRO_CC) + by_symbol_.insert(iter, make_pairconst string,Value(name, value)); +#else by_symbol_.insert(iter, make_pair(name, value)); +#endif return true; } Index: src/google/protobuf/compiler/command_line_interface.cc === --- src/google/protobuf/compiler/command_line_interface.cc (revision 2) +++ src/google/protobuf/compiler/command_line_interface.cc (working copy) @@ -474,7 +474,7 @@ // If no --proto_path was given, use the current working directory. if (proto_path_.empty()) { -proto_path_.push_back(make_pair(, .)); +proto_path_.push_back(make_pair(string(), string(.))); } // Check some errror cases. Index: src/google/protobuf/repeated_field.cc === --- src/google/protobuf/repeated_field.cc (revision 2) +++ src/google/protobuf/repeated_field.cc (working copy) @@ -40,7 +40,7 @@ // HP C++ on Tru64 can't handle the stuff below being defined out-of- line, so // on that platform everything is defined in repeated_field.h. On other // platforms, we want these to be out-of-line to avoid code bloat. -#if !defined(__DECCXX) || !defined(__osf__) +#if !defined(__SUNPRO_CC) (!defined(__DECCXX) || !defined (__osf__)) namespace internal { --- Below changes the examples makefile to exercise protobuf under solaris Index: examples/Makefile === --- examples/Makefile (revision 2) +++ examples/Makefile (working copy) @@ -1,5 +1,13 @@ # See README.txt. +# For the rest of the world +#CXX = c++ +#PROTOC = protoc + +# Testing For Solaris (pre-install) +CXX = CC -I../src -L../src/.libs +PROTOC = ../src/protoc + .PHONY: all cpp java python clean all: cpp java python @@ -18,14 +26,14 @@ rmdir com 2/dev/null || true protoc_middleman: addressbook.proto - protoc --cpp_out=. --java_out=. --python_out=. addressbook.proto + $(PROTOC) --cpp_out=.
Re: Communication methods
On Thu, Jun 4, 2009 at 5:23 AM, Stas Oskin stas.os...@gmail.com wrote: Thanks for the tip, any idea if the plain UNIX pipes are working with protobuf? You can send a protocol buffer over a pipe, sure. It's just bytes. Regards. 2009/5/25 Christopher Smith cbsm...@gmail.com http://code.google.com/p/protobuf/wiki/RPCImplementations On Sun, May 24, 2009 at 12:42 PM, SyRenity stas.os...@gmail.com wrote: Hi. Sorry if this was already asked in the past, but does Protocol Buffers provide some IPC communication methods? Or they provide the data encapsulation, and I should use any method I want? Regards. -- Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
Re: /usr/include/google/protobuf/stubs/once.h: undefined reference to `pthread_once'
Excuse me the annoyance... Absolutely right. That was the problem. I was adding the lpthread the my USEs but I didn't added it to the project. Thank you very much once more. Best regards. 2009/6/4 Henner Zeller h.zel...@acm.org sounds like linking the pthread library is missing. Add -lpthread to your linker options. On Thu, Jun 4, 2009 at 1:27 PM, Carmen carmen.navarr...@gmail.com wrote: Hi all, I'm just having some errors when compiling my first .proto file. I made the .proto and compile it with protoc and all goes excellent. Then I import the .c and .h files into my C++ project and when I compile all together I receive the error of the subject of this mail. My system is a gentoo linux with gcc version 4.2.4-r1 p1.1 and I'm using Eclipse (of course I added the protobuf to the list of libraries needed to compile the project). This is the output of emerge --info: Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.10.1-r0, 2.6.22 i686) = System Settings = System uname: Linux-2.6.22-i686-Intel-R-_Core- tm-2_duo_cpu_t71...@_1.80ghz-with-gentoo-2.0.1 Timestamp of tree: Thu, 04 Jun 2009 01:00:02 + app-shells/bash: 4.0_p24 dev-java/java-config: 1.3.7-r1, 2.1.8 dev-lang/python: 2.4.4-r14, 2.5.4-r2, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox:1.9 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.29 ACCEPT_KEYWORDS=x86 ~x86 CBUILD=i686-pc-linux-gnu CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu CONFIG_PROTECT=/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/ kde/3.5/shutdown /usr/share/config /usr/share/cursors/xorg-x11/ default /var/lib/hsqldb CONFIG_PROTECT_MASK=/etc/ca-certificates.conf /etc/env.d /etc/env.d/ java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/ gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/ texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d / etc/texmf/web2c /etc/udev/rules.d CXXFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=cvs distlocks fixpackages keeptemp keepwork parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox GENTOO_MIRRORS=ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/ gentoo LANG=es_ES.utf8 LC_ALL=es_ES.utf8 LDFLAGS=-Wl,-O1 LINGUAS=es en de MAKEOPTS=-j3 PKGDIR=/usr/portage/packages PORTAGE_CONFIGROOT=/ PORTAGE_RSYNC_OPTS=--recursive --links --safe-links --perms --times -- compress --force --whole-file --delete --stats --timeout=180 -- exclude=/distfiles --exclude=/local --exclude=/packages PORTAGE_TMPDIR=/var/tmp PORTDIR=/usr/portage PORTDIR_OVERLAY=/usr/local/portage/layman/gnome /usr/local/portage/ layman/sunrise /usr/local/portage/layman/desktop-effects SYNC=rsync://rsync.gentoo.org/gentoo-portage USE=X aac acl acpi alsa berkdb bluetooth branding browserplugin bzip2 cairo cdparanoia cdr cli cracklib crypt cups dbus divx4linux dri dts dv dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox font- server fortran gdbm gif gnome gnomedb gpm gstreamer gtk gtk2 hal iconv ieee1394 isdnlog java jpeg ldap libnotify mad matroska midi mikmod mmx mono mp3 mpeg msn mudflap ncurses nls nptl nptlonly offensive ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sdk sdl session spell spl sse ssl startup-notification svg sysfs tcpd theora tiff truetype unicode usb userlocales v4l2 vorbis win32codecs wmf x86 xinerama xml xorg xprint xulrunner xv xvid zlib ALSA_CARDS=hda-intel ALSA_PCM_PLUGINS=adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol APACHE2_MODULES=actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias ELIBC=glibc INPUT_DEVICES=keyboard mouse KERNEL=linux LCD_DEVICES=bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text LINGUAS=es en de USERLAND=GNU VIDEO_CARDS=fbdev vesa fglrx Unset: CPPFLAGS, CTARGET,
Re: Problem with linking runtime libraries on Windows for C++
When you compile your app, are you making sure to use the same C runtime library against which you compiled libprotobuf? It looks like it's complaining about missing functions in the C runtime. On Thu, Jun 4, 2009 at 8:58 AM, wayne.mene...@gmail.com wrote: Hi, I am trying to use Google Protocol Buffers run time libraries in my application. To use Protocol Buffers, I need to first build the run- time libraries for C++ on Windows. I am using Visual Studio 2003. While linking the libraries into my application I get the following errors. Can anyone help me figure out what might be the issue? libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function int __cdecl google::protobuf::io::`anonymous namespace'::close_no_eintr(int) (? close_no_ei...@? a0x29e80...@io@proto...@google@@y...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read (void *,int) (? r...@copyingfileinputstream@fileinputstr...@io@proto...@google@@uaehp...@z ) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write (void const *,int) (? wr...@copyingfileoutputstream@fileoutputstr...@io@proto...@google @@uae_np...@z) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
Re: Using dynamic library
Yes, you need to use the protobuf runtime library. Each language has an independent runtime library. libprotobuf.so is only for C++. For Java, there is a Maven-built jar file on which you need to depend. You don't need to link against the C++ dynamic library for Java apps. On Thu, Jun 4, 2009 at 5:39 AM, SyRenity stas.os...@gmail.com wrote: Hi. A bit naive question, but the protobuf dynamic library is required for compiling, correct? I mean, protobuf is not header-only library? If yes, does the Java version requires the dynamic library, and how it is linked, when using Maven built JAR? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
Re: Problem with linking runtime libraries on Windows for C++
Thanks for yoru response! I found that Microsoft Visual Studio was using the /MDd flag while compiling libprotobuf.lib. I changed it to use /MD which is what I am using to build my application. So now both are using the same flags, but I am still seeing the same error. I am linking the application against msvcrt.lib and msvcprt.lib which is what MSDN suggests for the /MD flag. Wayne On Thu, Jun 4, 2009 at 4:50 PM, Kenton Varda ken...@google.com wrote: When you compile your app, are you making sure to use the same C runtime library against which you compiled libprotobuf? It looks like it's complaining about missing functions in the C runtime. On Thu, Jun 4, 2009 at 8:58 AM, wayne.mene...@gmail.com wrote: Hi, I am trying to use Google Protocol Buffers run time libraries in my application. To use Protocol Buffers, I need to first build the run- time libraries for C++ on Windows. I am using Visual Studio 2003. While linking the libraries into my application I get the following errors. Can anyone help me figure out what might be the issue? libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function int __cdecl google::protobuf::io::`anonymous namespace'::close_no_eintr(int) (? close_no_ei...@? a0x29e80...@io@proto...@google@@y...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read (void *,int) (? r...@copyingfileinputstream@fileinputstr...@io@proto...@google @@uaehp...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write (void const *,int) (? wr...@copyingfileoutputstream@fileoutputstr...@io@proto...@google @@uae_np...@z) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---
Re: Problem with linking runtime libraries on Windows for C++
/MDd is the debug library. libprotobuf.lib only links against it when built in debug mode. Are you also compiling your app in debug mode? You need to make sure to compile both projects in the same mode. Are you able to build the tests that come with the protobuf code? If so, maybe check what's different between the tests project and your project. Otherwise, I don't have any other ideas. On Thu, Jun 4, 2009 at 3:38 PM, Wayne Menezes wayne.mene...@gmail.comwrote: Thanks for yoru response! I found that Microsoft Visual Studio was using the /MDd flag while compiling libprotobuf.lib. I changed it to use /MD which is what I am using to build my application. So now both are using the same flags, but I am still seeing the same error. I am linking the application against msvcrt.lib and msvcprt.lib which is what MSDN suggests for the /MD flag. Wayne On Thu, Jun 4, 2009 at 4:50 PM, Kenton Varda ken...@google.com wrote: When you compile your app, are you making sure to use the same C runtime library against which you compiled libprotobuf? It looks like it's complaining about missing functions in the C runtime. On Thu, Jun 4, 2009 at 8:58 AM, wayne.mene...@gmail.com wrote: Hi, I am trying to use Google Protocol Buffers run time libraries in my application. To use Protocol Buffers, I need to first build the run- time libraries for C++ on Windows. I am using Visual Studio 2003. While linking the libraries into my application I get the following errors. Can anyone help me figure out what might be the issue? libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function int __cdecl google::protobuf::io::`anonymous namespace'::close_no_eintr(int) (? close_no_ei...@? a0x29e80...@io@proto...@google@@y...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read (void *,int) (? r...@copyingfileinputstream@fileinputstr...@io@proto...@google @@uaehp...@z) libprotobuf.lib(zero_copy_stream_impl.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write (void const *,int) (? wr...@copyingfileoutputstream@fileoutputstr...@io@proto...@google @@uae_np...@z) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~--~~~~--~~--~--~---