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 8844897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:36:08+00:00 2026-06-14T11:36:08+00:00

I am learning MathGL, a C++ library, but I find myself cannot draw a

  • 0

I am learning MathGL, a C++ library, but I find myself cannot draw a graph on the screen even using the “example code” they provided, although I can successfully draw a graph to file. The “sample codes” on their official website is as below:

#include <mgl2/window.h>
int sample(mglGraph *gr)
{
  gr->Rotate(60,40);
  gr->Box();
  return 0;
}
//-----------------------------------------------------
int main(int argc,char **argv)
{
  mglWindow gr(sample,"MathGL examples");
  return gr.Run();
}

I compile this code as:

g++ test.cpp -o test.o -lmgl-wnd

as the developers suggest. This piece of code can be compiled successfully, but nothing happened when I execute the “test.o”. Anyone knows where I am going wrong?

  • 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-06-14T11:36:09+00:00Added an answer on June 14, 2026 at 11:36 am

    I think that you might have installed the MathGL library “without gsl and HDF5 Support”(Win32 LGPL). I had the same problem, too. And then, I found that Win32 LGPL does not support “wrapper widget classes”(which “mglWindow” is from, I think, see http://mathgl.sourceforge.net/web_en/web_en_1.html#Main). So when I installed the one “with gsl and HDF5 Support”(Win32 GPL, Of course with the gsl library installed, the gsl installation takes about 1 hour), and it succeeds.

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

Sidebar

Related Questions

Learning more about code contracts, they seem like something I want to use in
Learning Objective-C and reading sample code, I notice that objects are usually created using
Learning Android I'm trying to find contacts using DISPLAY_NAME selector. I need to find
Learning some VBA. So far, I've constructed this piece of code which should allow
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
Learning to use Ruby Threads for transportability of code between different OS platforms. The
learning Jquery and integrating with PHP - getting there, but have one last challenge
learning about loops (still a beginner) in VB.net. I have got the below code
Learning try & catch. What is wrong with the following code? Thanks for the
Learning Python here: I am simply trying to switch characters in a string. Example:

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.