Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7447213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:32:34+00:00 2026-05-29T12:32:34+00:00

I’m using Codeblocks as my IDE with MingGW. I’m trying to use google protocol

  • 0

I’m using Codeblocks as my IDE with MingGW.
I’m trying to use google protocol buffers,
but I’m having trouble building the protobuf.

The readme file for protobuf says:

If you are using Cygwin or MinGW,
follow the Unix installation instructions, above.

The Unix instructions says:

To build and install the C++ Protocol Buffer runtime and the Protocol
Buffer compiler (protoc) execute the following:
$ ./configure
$ make
$ make check
$ make install

I don’t know how to perform these in Windows
because “configure” is a Unix script and
I don’t know how to execute it, or the rest of the commands.

Can someone explain in more detail how
I can build protobuf using MinGW on Windows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:32:36+00:00Added an answer on May 29, 2026 at 12:32 pm

    Here’s what worked for me:

    1. You need to install MSYS with mingw. This is a minimal unix-like shell environment that lets you configure/make most unix packages. Read the mingw docs on how to install that (either with mingw-get or the GUI installer).

    2. Once you have installed MSYS, you should have a shortcut in your start menu, named “MinGW Shell”. That opens a console with a bash.

    3. Extract the source tarball to your MSYS home directory. I have mingw installed in “D:\prog”, so the directory was “D:\prog\MinGW\msys\1.0\home\<username>”. You can tell your MSYS username from the shell prompt. When done, you should have a directory “D:\prog\MinGW\msys\1.0\home\<username>\protobuf-2.4.1”.

    4. At the shell prompt, change to the protobuf directory:

      cd protobuf-2.4.1

    5. Run the configure script (note the backquotes):

      ./configure --prefix=`cd /mingw; pwd -W`

      The --prefix paramater makes sure protobuf is installed in the mingw directory tree instead of the MSYS directories, so you can build outside the MSYS shell (e.g. with CodeBlocks…)

    6. Run make:

      make

    7. Install:

      make install

    8. That’s it. You should now be able to compile your project with protobuf.
      You should be able to:

      • call protoc from your project/makefiles
      • #include <google/protobuf/message.h> etc.
      • link with -lprotobuf or -lprotobuf-lite

    HTH
    Peter

    Edit:
    Bringing this a bit more up to date. I tried setting up a new PC with current versions of MinGW and protobuf 2.5.0, and these are the problems I had:

    1. There is no “MinGW Shell” shortcut in the start menu.
      For some reason current MinGW installations fail to install that.
      But there is a msys.bat in <Mingw home>\msys\1.0 which brings up a console with a bash. Create a shortcut to that batch file somewhere.

    2. gcc does not work from the MSYS shell.
      I had to run a post-installation batch file manually and answer the questions there. This sets up fstab entries that mount the mingw directories in the MSYS environment.
      You need to run <Mingw home>\msys\1.0\postinstall\pi.bat

    3. My Avira antivirus interfered with the protobuf compilation.
      It complained about the generated protoc.exe being a “TR/Crypt.XPACK.Gen” trojan and blocked acces to that file, resulting in a corrupted build.
      I got error messages saying something like protoc:./.libs/lt-protoc.c:233: FATAL: couldn't find protoc. when trying to start protoc.
      I had to disable the Avira realtime scanner and make clean && make && make install again

    Edit #2:

    This post has aged quite a bit, and mingw does not equal mingw anymore.
    In this day and age, I would rather recommend MSYS2 which comes with a port of ArchLinux’s pacman package manager, a recent, better-working (c++11 std::thread support!) mingw fork for both 32 and 64 bit, and a protobuf package that you just need to install and be good.

    Go here to download!

    Hope this helps!
    Peter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.