On cygwin you should really use the provided configure script and
makefiles.  Once you've installed the library you can use your IDE for your
own project that uses protocol buffers.

If you really want to compile with an IDE, then you will at least have to
run the configure script to produce config.h, which is included by other
protobuf headers.  Note that you should NOT try to force the protobuf code
to use windows.h or any of the _WIN32 stuff.  The whole point of Cygwin is
to provide a POSIX-like API on top of Windows, so you should let libprotobuf
use that API instead of using Win32 directly.

On Sun, May 24, 2009 at 1:01 PM, Alexey Yakubovich <alexe...@gmail.com>wrote:

> Is it possible at all (and how) to run gtest_main on Windows?
>
> I try to build PB on java and on C++. Java is OK.
>
> On C++, I use NetBeans 6.5.1 C++ with cygwin. After fixing some things I
> managed to compile whole project, with tests. Major innovation (I hope
> not breaking PB ?), I just commented out stuff in common.cc, forsing usage
> of windows.h, like this:
>
> //#ifdef _WIN32
> //#define WIN32_LEAN_AND_MEAN  // We only need minimal includes
> #include <windows.h>
> //#elif defined(HAVE_PTHREAD)
> //#include <pthread.h>
> //#else
> //#error "No suitable threading library available."
> //#endif
>
> (I tried to define _WIN32, but then it does not compile)
>
> But when run, I have
>
> D:\Proj\NB65_CPP\PB_C3\dist\Debug\Cygwin-Windows>pb_c3.exe
>   14871 [main] pb_c3 4204 _cygtls::handle_exceptions: Exception:
> STATUS_ACCESS_VIOLATION
>   16789 [main] pb_c3 4204 open_stackdumpfile: Dumping stack trace to
> pb_c3.exe.stackdump
>
> (pb_c3.exe in my home-built PB)
>
> Or should is it better for PB C++/Windows to use scripts configure make
> make check etc.supplyed with PB distribution, not moving stuff to my
> convenient IDE?
>
> And what is the simplest possible argv for gtest_main?
>
> Thanks for any help / sharing know how
>
> Alexey
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to