|
|
Home » Developing U++ » U++ Developers corner » Quick and dirty solution to .icpp problem...
|
Re: Quick and dirty solution to .icpp problem... [message #11386 is a reply to message #11362] |
Mon, 10 September 2007 19:44   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
luzr wrote on Sun, 09 September 2007 17:55 |
This way, you can call this in GUI_APP_MAIN when building outside theide.
|
Could you please also make copies of icpp files with cpp extensions, so, they can be compiled with MSVS without extra-troubles?
Regards,
Novo
|
|
|
|
|
|
|
|
|
|
|
|
Re: Quick and dirty solution to .icpp problem... [message #12401 is a reply to message #12399] |
Sat, 27 October 2007 19:04   |
sergei
Messages: 94 Registered: September 2007
|
Member |
|
|
luzr wrote on Sat, 27 October 2007 18:27 |
Quote: |
P.S. MSVC8 simply denies building U++ with /O2 (outside TheIDE). Unless I always use manual commandline with all optimization options (excluding /Og), it hangs/crashes on linkage. And with these options I have a larger EXE - 1.8 MB vs 1.3MB in TheIDE + O2 vs 1.4MB in TheIDE with same options (that's even weirder - simply using a lib adds 0.4MB?).
|
With SCU?
Mirek
|
No, Lib (you didn't answer my post regarding SCU so I paused it for a while). I tried different combinations (Lib with O2, program with manual, reverse, etc.), but results are the same - unless both Lib and the program that uses it are built without O2 (e.g. no optimizations at all or custom optimizations), linker either hangs (usually when using custom in the program and O2 in Lib) or crashes (when using O2 in program). Building release with custom optimizations in both works, but as I said, I get larger EXE (even larger than in TheIDE if I replace O2 with custom optimizations there).
While 0.4-0.5MB aren't that significant, that's quite annyoing since I don't see a decent reason for such increase.
|
|
|
Re: Quick and dirty solution to .icpp problem... [message #12402 is a reply to message #12401] |
Sat, 27 October 2007 19:33   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
sergei wrote on Sat, 27 October 2007 13:04 |
luzr wrote on Sat, 27 October 2007 18:27 |
Quote: |
P.S. MSVC8 simply denies building U++ with /O2 (outside TheIDE). Unless I always use manual commandline with all optimization options (excluding /Og), it hangs/crashes on linkage. And with these options I have a larger EXE - 1.8 MB vs 1.3MB in TheIDE + O2 vs 1.4MB in TheIDE with same options (that's even weirder - simply using a lib adds 0.4MB?).
|
With SCU?
Mirek
|
No, Lib (you didn't answer my post regarding SCU so I paused it for a while).
|
I might have lost the track... How did you got the lib?
Quote: |
I tried different combinations (Lib with O2, program with manual, reverse, etc.), but results are the same - unless both Lib and the program that uses it are built without O2 (e.g. no optimizations at all or custom optimizations), linker either hangs (usually when using custom in the program and O2 in Lib) or crashes (when using O2 in program). Building release with custom optimizations in both works, but as I said, I get larger EXE (even larger than in TheIDE if I replace O2 with custom optimizations there).
While 0.4-0.5MB aren't that significant, that's quite annyoing since I don't see a decent reason for such increase.
|
Really strange.
Mirek
|
|
|
Re: Quick and dirty solution to .icpp problem... [message #12406 is a reply to message #12402] |
Sat, 27 October 2007 21:53   |
sergei
Messages: 94 Registered: September 2007
|
Member |
|
|
Lib works (almost, I only now noticed icpps weren't handled well, but I can fix that). pkggen wasn't used only for SCU, it also made a folder like the one attached. Add all files in the folder to a project (not a difficult task with most IDEs - select all and add to project), then build - voila, a Lib. Of course, you first have to add uppsrc to include folders, add winmm.lib mpr.lib etc. to linker, and then:
MSVC - replace O2 with commandline optimization in release
MinGW - add Core/Core.h as precompiled header
About 2 minutes work, then hit build - around 15 mins. debug + release in MSVC.
Strange thing is the MS linker bug, since AFAIK only some package combinations trigger it (I think without RichEdit it might've worked for UWord). But I don't feel like investigating MS bugs now.
-
Attachment: UppLib.zip
(Size: 41.60KB, Downloaded 352 times)
|
|
|
Re: Quick and dirty solution to .icpp problem... [message #12410 is a reply to message #12406] |
Sun, 28 October 2007 02:55   |
sergei
Messages: 94 Registered: September 2007
|
Member |
|
|
Update: fixed icpps, Chameleon works, size went up - 2.0MB, got no clue why...
I'm attaching what I'm using, and a demo (UWord) project, maybe someone could guess what's up with the EXE size.
Instructions (MSVC):
0) Extract files into uppsrc folder, and add it to compiler's include path.
1) Create an empty lib project.
2) Add all files in UppLib folder to project (VS UI might become unresponsive for a while, just wait).
3) Change code generation to multi-threaded debug in debug, multi-threaded in release.
4) In release, set optimizations to custom, and add to compiler command line: /GS- /Ob2 /Gs /GF /Gy /Oi /Ot /Oy
5) Build library and copy to MSVC's lib directory.
6) Create a Win32 empty GUI project for UWord.
7) Add UWord.cpp, UppBase.cpp, UppBase.h from UWord folder to project.
8) Repeat 3 and 4 for this project.
9) Add winmm.lib mpr.lib to linker, and also debug and release libs to debug and release respectively.
10) Build, examine EXE size and program functionality.
-
Attachment: ULib.zip
(Size: 71.73KB, Downloaded 373 times)
|
|
|
|
Re: Quick and dirty solution to .icpp problem... [message #12647 is a reply to message #12410] |
Mon, 12 November 2007 10:08  |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
sergei wrote on Sat, 27 October 2007 21:55 | Update: fixed icpps, Chameleon works, size went up - 2.0MB, got no clue why...
I'm attaching what I'm using, and a demo (UWord) project, maybe someone could guess what's up with the EXE size.
Instructions (MSVC):
0) Extract files into uppsrc folder, and add it to compiler's include path.
1) Create an empty lib project.
2) Add all files in UppLib folder to project (VS UI might become unresponsive for a while, just wait).
3) Change code generation to multi-threaded debug in debug, multi-threaded in release.
4) In release, set optimizations to custom, and add to compiler command line: /GS- /Ob2 /Gs /GF /Gy /Oi /Ot /Oy
5) Build library and copy to MSVC's lib directory.
6) Create a Win32 empty GUI project for UWord.
7) Add UWord.cpp, UppBase.cpp, UppBase.h from UWord folder to project.
Repeat 3 and 4 for this project.
9) Add winmm.lib mpr.lib to linker, and also debug and release libs to debug and release respectively.
10) Build, examine EXE size and program functionality.
|
Thanks.
Mirek
|
|
|
Goto Forum:
Current Time: Sat May 10 04:47:45 CEST 2025
Total time taken to generate the page: 0.03360 seconds
|
|
|