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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:07:10+00:00 2026-06-12T17:07:10+00:00

I have very little knowledge about C/C++ but I would like to compile a

  • 0

I have very little knowledge about C/C++ but I would like to compile a C++ console project to a regular Windows application. So at the end the app has NO forms at all and only executes the code. Here is the code I have from a ufasoft miner:

/*###########################################################################################################################
# Copyright (c) 1997-2012 Ufasoft   http://ufasoft.com   mailto:support@ufasoft.com                                         #
#                                                                                                                           #
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License #
# as published by the Free Software Foundation; either version 3, or (at your option) any later version.                    #                                                          #
#                                                                                                                           #
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied        #
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.     #
#                                                                                                                           #
# You should have received a copy of the GNU General Public License along with this program;                                #
# If not, see <http://www.gnu.org/licenses/>                                                                                #
###########################################################################################################################*/

#include <el/ext.h>

using namespace Ext;

#undef main
#undef wmain

extern "C" int __cdecl _my_wmain(int argc, wchar_t *argv[], wchar_t *envp[]);
extern "C" int __cdecl _my_main(int argc, char *argv[], char *envp[]);


int _cdecl ext_main(int argc, argv_char_t *argv[], argv_char_t *envp[]) {
#if UCFG_WCE
    RegistryKey(HKEY_LOCAL_MACHINE, "Drivers\\Console").SetValue("OutputTo", 0);
#endif

    atexit(MainOnExit);

#if UCFG_ARGV_UNICODE
    return _my_wmain(argc, argv, envp);
#else
    return _my_main(argc, argv, envp);
#endif
}

#if UCFG_WCE
#   if UCFG_ARGV_UNICODE
#       pragma comment(linker, "/ENTRY:mainWCRTStartup")
#   else
#       pragma comment(linker, "/ENTRY:mainACRTStartup")
#   endif
#endif

How can I convert this to a regular windows app?
I already changed the SubSystem to Windows (/SUBSYSTEM:WINDOWS).
Then I changed the EntryPoint in ProjectSettings to ext_main.
I also have to make sure that the functions gets the CMDCommandLine cause the APP needs to read the parameters.

Thank you for your help.

  • 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-12T17:07:11+00:00Added an answer on June 12, 2026 at 5:07 pm

    Use WinMain:

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    {
        return 0;
    }
    

    And set the entry point on Project Properties -> Linker -> Advanced -> Entry Point to WinMain.

    And also /SUBSYSTEM:WINDOWS, but you’ve already done that.

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

Sidebar

Related Questions

I have very little knowledge about app development, but I am updating an existing
I have very little knowledge about unix. My task is to write a shell
I just started out with C and have very little knowledge about performance issues
Please excuse my lack of knowledge on the topic, but I have very little,
I am currently maintaining a VB6 app, but have very little knowledge of VB6.
I have basically no knowledge of sbt and know very little about maven or
I have very little programming knowledge; only a fair bit in Visual Basic. How
This is a very simple question yet I have little knowledge in Linux and
I have very little experience using Sharepoint but a good amount using Visual Studio
I have some ideas for web apps. Sadly, I have very little knowledge of

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.