Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » error LNK2019 when using CtrlLib/CtrlLib.h
error LNK2019 when using CtrlLib/CtrlLib.h [message #37603] Thu, 25 October 2012 03:09 Go to next message
DrinkWatah is currently offline  DrinkWatah
Messages: 12
Registered: October 2012
Location: Cali
Promising Member
error LNK2019: unresolved external symbol "void * __cdecl Upp::MemoryAlloc(unsigned int)" (?MemoryAlloc@Upp@@YAPAXI@Z) referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
main.obj : error LNK2019: unresolved external symbol "void __cdecl Upp::MemoryFree(void *)" (?MemoryFree@Upp@@YAXPAX@Z) referenced in function "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function__tmainCRTStartup





I'm running the following GUI tutorial

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

    GUI_APP_MAIN{
     	PromptOK("Hello world");     
         
    }






While troubleshooting, I also get an error stating that namespace UPP does not exist

what am I doing wrong?


thanks
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37604 is a reply to message #37603] Thu, 25 October 2012 03:35 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
That is ../tutorial/Gui01.
What is your OS?
What compiler are you using?

If you downloaded and installed Upp and a compiler for your OS it should run.
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37605 is a reply to message #37603] Thu, 25 October 2012 04:03 Go to previous messageGo to next message
DrinkWatah is currently offline  DrinkWatah
Messages: 12
Registered: October 2012
Location: Cali
Promising Member
thanks for the reply


OS: Win 7
Compiler: VS10


I successfully ran the console example of hello world
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37606 is a reply to message #37603] Thu, 25 October 2012 04:51 Go to previous messageGo to next message
DrinkWatah is currently offline  DrinkWatah
Messages: 12
Registered: October 2012
Location: Cali
Promising Member
Solved.

Had theIDE build mode set for Optimal, changed it to debug and it works now. Not sure why though
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37610 is a reply to message #37606] Thu, 25 October 2012 22:49 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi DrinkWatah,

Do you mean that you can compile only under debug mode Confused

Normally you should be able to compile under debug and optimal mode using MSC10 (my system is WinXP and no problem for compiling under both modes).

Could you post your configuration builds (as shown in theide menu "Setup/Bluid methods")?

Regards
Biobytes
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37611 is a reply to message #37603] Fri, 26 October 2012 00:42 Go to previous messageGo to next message
DrinkWatah is currently offline  DrinkWatah
Messages: 12
Registered: October 2012
Location: Cali
Promising Member
Hey BioBytes, thanks for the reply

For clarification, in a span of a few minutes, I solved one problem and then encountered another. The first problem, getting the error LNK2019, I solved by simply adding the Ctrl package. But then when I attempted to build, theIDE would always crash with the optimal build option

I wasn't sure whether both problems were related, so when I replied with my solution, I did not make clear which problem the solution satisfied

I found it strange that anytime I built the program with optimal option, theIDE would crash. Even with the basic tutorial code. Once I made that debug option switch, it worked

So I created a new project. Set the configuration for optimal build, it took awhile, but it now works. I'm not sure why theIDE was crashing before however

index.php?t=getfile&id=3901&private=0

[Updated on: Fri, 26 October 2012 00:43]

Report message to a moderator

Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37614 is a reply to message #37611] Fri, 26 October 2012 10:22 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi DrinkWatah,

Your configuration in exactly the same I have except the path is bin/v7.1 on my system (SDK win7) but all seems correct.

Could you show the configuration in "Build/output mode" ? You can get it in Theide main menu?

Cheers
Biobytes


Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37620 is a reply to message #37614] Sat, 27 October 2012 01:48 Go to previous messageGo to next message
DrinkWatah is currently offline  DrinkWatah
Messages: 12
Registered: October 2012
Location: Cali
Promising Member
index.php?t=getfile&id=3902&private=0
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37630 is a reply to message #37620] Mon, 29 October 2012 10:17 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hello DrinkWatah,

Sorry for delayed reply due to be busy with family this week-end. Could you uncheck optimal mode in "Output" menu window and select optimal mode in main menu bar (using the droplist beside the droplist showing "GUI")of Ide and compile your project ?

Let me know

Regards

Biobytes
Re: error LNK2019 when using CtrlLib/CtrlLib.h [message #37644 is a reply to message #37630] Tue, 30 October 2012 09:24 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hello,

This sounds as a lacking lib. I strongly suggest you update your system with the latest nightly builds (for me UPP 5491) so no link problem happens with MSC10.

If not perhaps you should check the Core.upp file with text editor and post its content.

Regards

Biobytes
Previous Topic: Multi Layout App
Next Topic: How to focus a dialog
Goto Forum:
  


Current Time: Fri Mar 29 09:08:54 CET 2024

Total time taken to generate the page: 0.02220 seconds