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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:43:28+00:00 2026-06-16T20:43:28+00:00

Good time of day! I compiled this code with g++ 4.7.2 on Ubuntu successfully,

  • 0

Good time of day!

I compiled this code with g++ 4.7.2 on Ubuntu successfully, but I have problems with compiling it on Windows with Mingw.

Simplified Code:

 size_t string_length=some_size;
 char arr_symb[string_length+1];

 char *outputde=arr_symb;
 iconv_t type=iconv_open("UTF-8","WINDOWS-1251");

char output[some_size];

char *p1=arr_symb;
char *p2=output;

if (   iconv(type, &p1,&string_length, &p2, &output_length ) == -1 )// here 
        // is mistake, it doesn't like pointers p1 and p2 but I wonder why

  log_info("something went wrong");

On Linux with G++ it can be compiled and works fine as it should. With Mingw I get errors:

enter image description here

I wonder, if it works fine with g++ , why does mingw treat it like it’s mistaken?

Thanks in advance!

ADDITION
My Mingw version is 4.4.0
GCC version is 4.7.2

  • 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-16T20:43:30+00:00Added an answer on June 16, 2026 at 8:43 pm

    Thanks all for your attention, problem is solved, but it’s all strange to me (it’s still unclear )

    Although the function has such prototype,

    enter image description here

    With MinGW it should be called so:

    enter image description here

    So, the problem is that input string for MinGW should be passed as constant (also it doesn’t have such prototype).

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

Sidebar

Related Questions

Good time of day! I successfully used apache + php on windows 7, but
Good day, My code generates a run-time error and I'm not sure how to
Good time of a day! I have a MVC project with query in controller:
Good time of a day. I have a problem. I need to test admob
Good day all, It's the first time I am using Qt on Windows CE
Good day, I'm not sure if this is possible but I want to merge
So I have been playing with jQuery for a good time now and I'm
I'm still relatively new to C++ and programming, but having a good time learning.
Good day all; I have an UIImageView that I animate around a large UIView.
Good day. When i try to run the example from MSDN. But it failed

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.