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 » TheIDE crash when compile with "All Shared" option
TheIDE crash when compile with "All Shared" option [message #27706] Fri, 30 July 2010 08:17 Go to next message
zhpingw is currently offline  zhpingw
Messages: 4
Registered: July 2010
Junior Member
Hi,

I try to compile U++ to .dll. So I tried it with "Hello World" in examples package.

I changed the Link mode option to "All Shared" in the output mode.

When compile it, "TheIDE" crashed.

After debug, I found in file "MCSBuilder.cpp" line 27

if(hdr->Machine != COFF_IMAGE_FILE_MACHINE_I386)

The pointer hdr == 0

I guess the reason is when the FileMapping opened, it's base attribute still 0.

So I added one line

mapping.Map(0, mapping.GetFileSize());

It will not crash, but still can't generated core.dll

My platform is Windows7 64bit with VC 10.

Regards

ZWang

Re: TheIDE crash when compile with "All Shared" option [message #27753 is a reply to message #27706] Sun, 01 August 2010 09:28 Go to previous messageGo to next message
zhpingw is currently offline  zhpingw
Messages: 4
Registered: July 2010
Junior Member
I'd make some progress,

core.dll is generated.

It stop at CtrlCore.dll.

Issue one:

there's a strange line "==" in the CtrlCore.def

After I removed it manually and try in commandline.

It say some external static not found like

ImageWin32.obj : error LNK2001: unresolved external symbol "public: static int U
pp::Image::Data::ResCount" (?ResCount@Data>@Image>@Upp@@2HA)
ImageWin32.obj : error LNK2001: unresolved external symbol "public: static class
Upp::Link<struct Upp::Image::Data,1> * Upp::Image::Data::ResData" (?ResData@Dat
a@Image>@Upp@@2PAV?$Link@UData>@Image>@Upp@@$00@3>@A)
CtrlClip.obj : error LNK2019: unresolved external symbol "void __cdecl Upp::Init
RichImage(class Upp::String (__cdecl*)(class Upp::Image const &,class Upp::Strin
g const &),bool (__cdecl*)(class Upp::PasteClip &),class Upp::Image (__cdecl*)(c
lass Upp::PasteClip &),char const * (__cdecl*)(void))" (?InitRichImage@Upp@@YAXP
6A?AVString@1>@ABVImage>@1>@ABV21@@ZP6A_NAAVPasteClip@1@@ZP6A?AV31@3>@ZP6APBDXZ>@Z) r
eferenced in function "void __cdecl Upp::s__s316_fn(void)" (?s__s316_fn@Upp@@YAX
XZ)
Re: TheIDE crash when compile with "All Shared" option [message #27766 is a reply to message #27706] Mon, 02 August 2010 15:04 Go to previous messageGo to next message
zhpingw is currently offline  zhpingw
Messages: 4
Registered: July 2010
Junior Member
I'm glad get it done finally.

1) I fixed the strange "==" in CtrlCore.def in file MscBuilder.cpp

if (name == "==")
continue;
out.FindAdd(name);

2) Fix some static link issue

Add these lines into ImageWin32.cpp

int Image::Data::ResCount;
Link<Image::Data> Image::Data::ResData[1];

3) Rename RichImage.icpp to RichImage.cpp

4) Compile package PdfDraw maually

5) Add ole32.lib to CtrlCore package

Finally I got dll version Hello world.

U++ is a great framework.
Re: TheIDE crash when compile with "All Shared" option [message #27767 is a reply to message #27706] Mon, 02 August 2010 15:29 Go to previous message
zhpingw is currently offline  zhpingw
Messages: 4
Registered: July 2010
Junior Member
Can someone tell me how to control package "static","all shared" separately?

Thanks
Previous Topic: String to int
Next Topic: theide does not show content of external headers
Goto Forum:
  


Current Time: Fri Mar 29 00:58:36 CET 2024

Total time taken to generate the page: 0.01207 seconds