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

  • Home
  • SEARCH
  • 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 161517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:13:37+00:00 2026-05-11T11:13:37+00:00

I am trying to compile the Python bindings for OpenSSL (pyOpenSSL) on Windows Vista

  • 0

I am trying to compile the Python bindings for OpenSSL (pyOpenSSL) on Windows Vista x64 using Visual Studio 2008. When I run python setup.py build_ext -I C:\OpenSSL\include, it dies with the following error:

building 'OpenSSL.crypto' extension C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I\OpenSSL\include -IC:\Python26\include -IC:\Python26\PC /Tcsrc/crypto/x509name.c /Fobuild\temp.win-amd64-2.6\Release\src/crypto/x509name.obj x509name.c src/crypto/x509name.c(16) : error C2133: 'crypto_X509Name_methods' : unknown size error: command ''C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe'' failed with exit status 2 

When I look at the source in question, I see the following at line 16:

static PyMethodDef crypto_X509Name_methods[]; 

My C is very rusty, so I don’t remember if you can do this or not. Since this is a Python library, I would guess that is is written to compile in gcc, but I don’t have a Cygwin environment installed on this computer. Is there some switch that I can use to get this code to compile with VS2008?

Answer:

Later on in the code, there is this:

/*  * ADD_METHOD(name) expands to a correct PyMethodDef declaration  *   {  'name', (PyCFunction)crypto_X509_name, METH_VARARGS }  * for convenience  */ #define ADD_METHOD(name)        \     { #name, (PyCFunction)crypto_X509Name_##name, METH_VARARGS,  crypto_X509Name_##name##_doc } static PyMethodDef crypto_X509Name_methods[] = {     ADD_METHOD(hash),     ADD_METHOD(der),     ADD_METHOD(get_components),     { NULL, NULL } }; #undef ADD_METHOD 

Going off of the suggestion of Neil Butterworth, I changed the line in error from:

static PyMethodDef crypto_X509Name_methods[]; 

to:

static PyMethodDef crypto_X509Name_methods[4]; 

and the code compiled.

Thanks to everyone.

  • 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. 2026-05-11T11:13:38+00:00Added an answer on May 11, 2026 at 11:13 am

    You probably have a situation like this:

    #include <stdio.h>  static int a[];     // declaration  // lots of code  int a[3];           // use 

    which compiles as C with gcc. I’m not sure it should (it is not valid C++) but I’m not enough of a C language lawyer to tell you for sure.

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

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Cross-platform libraries that are free for commercial (or non-commercial) applications… May 11, 2026 at 3:53 pm
  • added an answer JAXB is definitely the solution. Why? Well, it's inside the… May 11, 2026 at 3:53 pm
  • added an answer Yes - use Dictionary.TryGetValue. It takes an out parameter to… May 11, 2026 at 3:53 pm

Related Questions

I am trying to get some accurate runtime comparisons of PHP vs Python (and
I am trying to implement string unescaping with Python regex and backreferences, and it
I am just trying to write a small web page that can parse some
I'm trying to substitute something in a string in python and am having some

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.