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 » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Can't compile console application with MS C++ Toolkit
Can't compile console application with MS C++ Toolkit [message #50] Tue, 22 November 2005 22:14 Go to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Hello all,

I'm trying out Ultimate++ release 511, I choosed to create new package from something like "console (no U++)" template, and compile it with MS C++ toolkit.

It will fail due to this problem:

LIBCD.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

This is because the executable is linked with
"-subsystem:windows"
option, while it should be linked with "-subsystem:console" option.

I know how to make it work in command line (sorry, I didn't bother to try if this is the only problem, and linking process is really succesfull after this change, so maybe there is more to do), but I don't know how to change this option in Ultimate++ IDE!

I checked some basic menus like Setup/Build methods and Build/Output mode, where I would expect the ability to change all options (like the Visual Studio has it in project properties), but I can't find a way to change this behaviour from IDE menu.

I didn't read any manuals yet, so I don't know if I can change this behaviour by editing some .ini files or something like that...

I just wished to try the IDE out, and use it for some simple console applications to produce some text files with numeric tables... so far it *looks* neat, but doesn't work for me.

I'm looking forward to try the IDE in action, hopefully someone will know how to fix this problem.

P.S.
I can't switch off this board from turning "_WinMain@16" into clickable e-mail automatically... heh...
Re: Can't compile console application with MS C++ Toolkit [message #54 is a reply to message #50] Tue, 22 November 2005 23:07 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Uh, my case is more complicated...

I already found the code in sources of IDE, which is responsible for linker options, and it does work for completely new package.

My case happened in this way:
I added new "test" package with "Basic CtrlLib application" ... toyed around with it for a while, than I deleted the package, and all files in "MyApps" directory.

I added "test" package (again) with "Console application ..." this time, and tried to build it. Than the linking process fails, but the test.upp file does NOT contain "GUI" flag, so it should work ok.

I think some cache in upp directory is responsible for this.

...

After doing some more restarts of IDE I don't see the "test" and "test2" packages anymore in "Select main package" menu, unless I check the "All packages" checkbox, but it's sort of weird to not see packages created by me so soon.

[Updated on: Tue, 22 November 2005 23:07]

Report message to a moderator

Re: Can't compile console application with MS C++ Toolkit [message #55 is a reply to message #50] Tue, 22 November 2005 23:15 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
yeah, after deleting all test* files in upp/cfg directory it works ok.

So the IDE does not reparse the .upp file when it should have.
(maybe the date of clean file from template is older, than the recent .cfg file from deleted package, or the IDE is completely unprepared for package deletion).
Re: Can't compile console application with MS C++ Toolkit [message #57 is a reply to message #50] Tue, 22 November 2005 23:27 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, the real problem is that "current main package config" is stored as text in .cfg file.

I guess we should check at startup whether this config exists in current .upp's main config to prevent these kinds of problems. I think that package recreation (instead of "already exists" message) would help here too.

Anyway, the simple and quick solution now would be to "reselect" main package config using that droplist in TheIDE toolbar.
Next Topic: howto see assembly code? [SOLVED]
Goto Forum:
  


Current Time: Sun Apr 28 00:53:37 CEST 2024

Total time taken to generate the page: 0.05063 seconds