User forums > Nightly builds

The 25 february 2006 build is out.

<< < (3/3)

killerbot:
Okay, focusing on the debug build only, first off all I removed in the project the "-g -debug" in the defines (project, and debug target), they should not be there.

When I compare (just on size) the object files, they seem of exact the same length. It seems thigs start to go differently during the linking step (smaller exe, equal size map file, but some addresses in the map file are different).

Your command line call is actually in one go compiling and linking, maybe internally other options are used ??

[EDIT] :
some differences in the link step

cmd line:
c:\dmd\bin\..\..\dm\bin\link.exe .objs\main+.objs\student,bin\D-Debug.exe,,user32+kernel32/co/noi;

CB :
C:\dmd\bin\..\..\dm\bin\link.exe .objs\student+.objs\main,bin\D-Debug.exe,,phobos.lib+user32+kernel32/noi;
This one got generated from : dmd.exe bin\D-Debug.exe  .objs\student.obj .objs\main.obj  phobos.lib

So disregarding the order in which the objs were mentioned (I turned them around in the command line batch file) the main difference is :

user32+kernel32/co/noi
<->
phobos.lib+user32+kernel32/noi


So what does the /co do ? does that bring in the extra stuff ?
other question : does the phobos.lib neet to be specified ? If so, is the .lib needed (assuming user32 and kernel32 are also libs ??)

Zingam:
dmd.exe is a compiler and debugger at the same time but it actually seems to invoke link.exe internally.


Here is what I have found:

If you type: link.exe /? you geta list of switches and there is listed /CO{deview}

This is a description of this option:
http://www.digitalmars.com/ctg/ctgLinkSwitches.html#codeview

All swtiches:
http://www.digitalmars.com/ctg/ctgLinkSwitches.html

Linker description:
http://www.digitalmars.com/ctg/optlink.html

and it is exactly about including codeview debug information.


--- Quote ---CODEVIEW

Syntax:      /[NO]CODEVIEW[:n]
Default:   /NOCODEVIEW

Controls whether OPTLINK should include CodeView information within the output .exe file. CodeView expects such information to be present within applicable .obj files being linked. OPTLINK includes any available CodeView information for all object modules unless the options /DEBUG, /DEBUGCOVERAGES, /DEBUGFILES, /DEBUGLINES, /DEBUGLOCALS, /DEBUGMODULES, /DEBUGPUBLICS, or /DEBUGTYPES are supplied.

n specifies the CodeView major version format desired (applicable only with /CODEVIEW). For CodeView 2.x, enter 2, for CodeView 3.x, enter 3, and for CodeView 4.x, enter 4. For /CODEVIEW without a number, OPTLINK uses the default. OPTLINK automatically performs the CVPACK step when n is 4.
--- End quote ---

killerbot:
ok recap :

1) we should continue this discussion in a "D" thread, I think there are other problems too
2) it is obvious that codeview stuff will enlarge the exe (so that will explain the size difference)
3) Digital Mars D  NEEDS also Digital Marc C (well at least the linker parts of it), I have checked the code of CB for "D" support, it containes some minor errors; You can see them yourself : go to the compiler and debugger settings : choose D compiler, and look at the programs (compare them with DMC), first of all :
   - DLL's : link.exe or dmd.exe ??  (for dmc : we specify link.exe)
   - static lib's : lib.exe
   - push the browse button for the static lib executable -> notice you are in the bin dir of "D", there's no link.exe or lib.exe overthere, since they are being used from DMC (dmd.exe apparantly knows how to get there, the ini file ??)  --> so we need to specify them fully ?? and autodetect them fully .. (damn)
   - it is for sure that the way dmd.exe and link.exe take their aruments is different !!!

So all you "D" users if you could try to investigate, try out, and report back your research on how it should be done in the other thread (http://forums.codeblocks.org/index.php?topic=2476.0), I could adopt the "D" support code. Please forgive me that I won't do the investigation myself, I don't have the time at this moment to learn how "D" and it's tools work.

One question for Yiannis : How come there's no entry to specify the linker for exe's ?? (we only can specify for dynamic and static LIBS) ?

orefa:
The keyboard focus is lost after error-free compilation (either a single file or a project). Either the child window with the focus should be noted before compilation and restored after, or maybe always return focus to the editor. Not sure which of the two is better...

Navigation

[0] Message Index

[*] Previous page

Go to full version