c++ - link error with /co
- Michael (18/18) Sep 10 2005 I reduce it to the simplest one, but the problem remains.
- Scott Michel (3/24) Sep 12 2005 As far as I can tell (and I've used Windbag (windbg as it's
- Michael (5/7) Sep 13 2005 Thanks Scott. But as far as I know, windbg needs symbol files(*.pdb) to ...
- Scott Michel (6/16) Sep 13 2005 Not necessarily. You don't actually need a pdb file to debug a program.
- Michael (9/14) Sep 15 2005 Thanks, it's really a good news to me. However, what annoys me is that I...
- Walter Bright (14/23) Sep 15 2005 can't
- Michael (6/17) Sep 16 2005 I copy the file "test_debug.cpp" to "E:\DigitalMars\" in which dmc is in...
- Walter Bright (7/12) Sep 16 2005 installed,
- Michael (2/3) Sep 20 2005 Thanks. But it's strange, the PATH does't matter whenever I drop "-g".
I reduce it to the simplest one, but the problem remains. //test_debug.cpp #include <cstdio> int main() { printf("Hello world\n"); return 1; } //------------------------------- The file is in "E:\C++\DMwork\Test" E:\C++\DMwork\Test>dmc -C -g test_debug the output is: link test_debug,,,user32+kernel32/co/noi; OPTLINK : Error 118: Filename Expected Path=... --- errorlevel 1 by the way, the compiler is installed in "E:\DigitalMars" version 8.45, and if I'd like to debug with windbg, is dmc compatible with it?
Sep 10 2005
As far as I can tell (and I've used Windbag (windbg as it's affectionately known to the MS developers), DMC's debug info is compatible. Michael wrote:I reduce it to the simplest one, but the problem remains. //test_debug.cpp #include <cstdio> int main() { printf("Hello world\n"); return 1; } //------------------------------- The file is in "E:\C++\DMwork\Test" E:\C++\DMwork\Test>dmc -C -g test_debug the output is: link test_debug,,,user32+kernel32/co/noi; OPTLINK : Error 118: Filename Expected Path=... --- errorlevel 1 by the way, the compiler is installed in "E:\DigitalMars" version 8.45, and if I'd like to debug with windbg, is dmc compatible with it?
Sep 12 2005
In article <dg4g94$24is$1 digitaldaemon.com>, Scott Michel says...As far as I can tell (and I've used Windbag (windbg as it's affectionately known to the MS developers), DMC's debug info is compatible.Thanks Scott. But as far as I know, windbg needs symbol files(*.pdb) to do source level debug, and it seems that dmc always put debug info together with the exe file.(though I can't even do it now) Would you please tell me how to manage it?
Sep 13 2005
Michael wrote:In article <dg4g94$24is$1 digitaldaemon.com>, Scott Michel says...Not necessarily. You don't actually need a pdb file to debug a program. In fact, windbg works just fine reading CV symbol information from the executable (/CO/DE flags to the DMC linker.) The pdb file exists to keep debug info separate from the executable, making the MS linker's job "easier" during incremental links.As far as I can tell (and I've used Windbag (windbg as it's affectionately known to the MS developers), DMC's debug info is compatible.Thanks Scott. But as far as I know, windbg needs symbol files(*.pdb) to do source level debug, and it seems that dmc always put debug info together with the exe file.(though I can't even do it now) Would you please tell me how to manage it?
Sep 13 2005
In article <dg7s14$2i1j$1 digitaldaemon.com>, Scott Michel says...Not necessarily. You don't actually need a pdb file to debug a program. In fact, windbg works just fine reading CV symbol information from the executable (/CO/DE flags to the DMC linker.) The pdb file exists to keep debug info separate from the executable, making the MS linker's job "easier" during incremental links.Thanks, it's really a good news to me. However, what annoys me is that I can't build the programme whenever passing switch /CO to the linker. More specifically dmc -C -g -L/CO/DE aaa.cpp it returns: link aaa,,,user32+kernel32/co/noi/CO/DE; OPTLINK : Error 118: filename expected path=... But, if I drop "-g" and "/CO", it builds well without debug info.
Sep 15 2005
"Michael" <Michael_member pathlink.com> wrote in message news:dgc1ur$1b9j$1 digitaldaemon.com...Thanks, it's really a good news to me. However, what annoys me is that Ican'tbuild the programme whenever passing switch /CO to the linker. Morespecificallydmc -C -g -L/CO/DE aaa.cpp it returns: link aaa,,,user32+kernel32/co/noi/CO/DE; OPTLINK : Error 118: filename expected path=... But, if I drop "-g" and "/CO", it builds well without debug info.When I try it, it works: ------------------------------------------------- C:\cbx>dmc -C -g -L/CO/DE test.cpp link test,,,user32+kernel32/co/noi/CO/DE; C:\cbx> ---------------------------------------------- However, you don't need the -C or the -L/CO/DE switches. Just -g will do fine.The file is in "E:\C++\DMwork\Test"The linker doesn't work well if it encounters "+" in a filename. Try renaming the directory from "C++" to "CPP".
Sep 15 2005
In article <dgcqdh$26ii$1 digitaldaemon.com>, Walter Bright says...When I try it, it works: ------------------------------------------------- C:\cbx>dmc -C -g -L/CO/DE test.cpp link test,,,user32+kernel32/co/noi/CO/DE; C:\cbx> ---------------------------------------------- However, you don't need the -C or the -L/CO/DE switches. Just -g will do fine.I copy the file "test_debug.cpp" to "E:\DigitalMars\" in which dmc is installed, and try "dmc -g test_debug.cpp", however the problem remains. I wonder if the linker can work well when there are some paths containing "+" in the enviroment "PATH" or the linker supports long filenames such as "E:\DigitalMars". Because it can be compiled successfully with "-g", but not linked.The file is in "E:\C++\DMwork\Test"The linker doesn't work well if it encounters "+" in a filename. Try renaming the directory from "C++" to "CPP".
Sep 16 2005
"Michael" <Michael_member pathlink.com> wrote in message news:dgeosj$1206$1 digitaldaemon.com...I copy the file "test_debug.cpp" to "E:\DigitalMars\" in which dmc isinstalled,and try "dmc -g test_debug.cpp", however the problem remains. I wonder ifthelinker can work well when there are some paths containing "+" in theenviroment"PATH" or the linker supports long filenames such as "E:\DigitalMars".Becauseit can be compiled successfully with "-g", but not linked.The linker does support long filenames. But the '+' in the PATH needs to go.
Sep 16 2005
In article <dgf0j1$19hi$1 digitaldaemon.com>, Walter Bright says...The linker does support long filenames. But the '+' in the PATH needs to go.Thanks. But it's strange, the PATH does't matter whenever I drop "-g".
Sep 20 2005