U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Basic package requirements (What packages do I have to include to link the Hello World example?)
Basic package requirements [message #44706] Sat, 30 May 2015 00:08 Go to next message
sixstringking is currently offline  sixstringking
Messages: 2
Registered: May 2015
Junior Member
Hello All,

I am brand new to Ultimate++. Starting with a new, empty package, I'm trying to build of the 'Hello World' example from the help file.
I've managed to eliminate most of the unresolved externals by adding the Core, CtrlCore, and CtrlLib packages, but the linker still can't find "_main":

LIBCMTD.lib(crt0.obj): error LNK2019: unresolved external symbol _main referenced in function __tmainCRTStartup

What package do I have to include to get _main? (I'm working in Cygwin/MinGW on a 64 bit Windows machine, if it matters.)

Thanking you all in advance.
Jeff

(By the way, sure would be nice if the IDE would allow me to copy build error messages to the clipboard rather than having to type them by hand.)
Re: Basic package requirements [message #44709 is a reply to message #44706] Mon, 01 June 2015 06:02 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
sixstringking wrote on Fri, 29 May 2015 18:08
Hello All,

I am brand new to Ultimate++. Starting with a new, empty package, I'm trying to build of the 'Hello World' example from the help file.
I've managed to eliminate most of the unresolved externals by adding the Core, CtrlCore, and CtrlLib packages, but the linker still can't find "_main":

LIBCMTD.lib(crt0.obj): error LNK2019: unresolved external symbol _main referenced in function __tmainCRTStartup

What package do I have to include to get _main? (I'm working in Cygwin/MinGW on a 64 bit Windows machine, if it matters.)

Thanking you all in advance.
Jeff


You need to add code below to one of your cpp-files.
#include <Core/Core.h>
CONSOLE_APP_MAIN
{
}


sixstringking wrote on Fri, 29 May 2015 18:08
Hello All,
(By the way, sure would be nice if the IDE would allow me to copy build error messages to the clipboard rather than having to type them by hand.)


Take a look at several icons in the right-down corner (you can also try to press ESC button several times to open/close this panel). One of the icons is called "Console". Click on it. This is probably what you are looking for.

Another useful thing is a check-box Setup --> "Be Verbose".

Hope this helps.


Regards,
Novo
Re: Basic package requirements [message #44710 is a reply to message #44709] Mon, 01 June 2015 10:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Another possible reason is that you need to have "GUI" in your main package config.

The reason is that Win32 builds GUI apps differently from console apps, that is why builder needs to know that you are building GUI.

(Package/project creation 'wizard' completely setups all necessary, but I guess you know this trying to recreate the process from the scratch to understand details, which I applaud... Smile

Mirek
Re: Basic package requirements [message #44714 is a reply to message #44710] Wed, 03 June 2015 02:44 Go to previous message
sixstringking is currently offline  sixstringking
Messages: 2
Registered: May 2015
Junior Member
Ah yes. That's it: the GUI flag. Thanks, Mirek.

Jeff
Previous Topic: How does one position the mouse cursor?
Next Topic: Vector deep copy constructor
Goto Forum:
  


Current Time: Tue May 05 06:47:10 GMT+2 2026

Total time taken to generate the page: 0.00548 seconds