Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - dmc and expat
I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. I've used the implib utility. The command line looks like this: dmc -L/libexpat main.cpp The code compiles well, but when i try to link it, i have the following messages: link main,,,user32+kernel32/noi/libexpat; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : LIBEXPAT main.obj(main) Error 42: Symbol Undefined _XML_ParserFree main.obj(main) Error 42: Symbol Undefined _XML_GetCurrentLineNumber main.obj(main) Error 42: Symbol Undefined _XML_ErrorString main.obj(main) Error 42: Symbol Undefined _XML_GetErrorCode main.obj(main) Error 42: Symbol Undefined _XML_Parse main.obj(main) Error 42: Symbol Undefined _XML_SetCharacterDataHandler main.obj(main) Error 42: Symbol Undefined _XML_SetElementHandler main.obj(main) Error 42: Symbol Undefined _XML_SetUserData main.obj(main) Error 42: Symbol Undefined _XML_ParserCreate --- errorlevel 9 Any ideea? Maybe i do not use the proper parameters on the command line? Regards Adi May 12 2004
adi <adi_member pathlink.com> wrote in news:c7t8ec$1do6$1 digitaldaemon.com:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. [...] Any ideea? Maybe i do not use the proper parameters on the command line? May 12 2004
Thanks for your fast reply. Unfortunatelly I have to build a console aplication, so I would rather not include wx in my program. The fact is that I'm quite new to c++ and I don't know very much about linking and other stuff. This solution was allready built (also by me) using mingw, but I would like to use digital mars because of its qualities. Thanks anyway In article <c7tdqq$1los$1 digitaldaemon.com>, W這dzimierz Skiba says...adi <adi_member pathlink.com> wrote in news:c7t8ec$1do6$1 digitaldaemon.com:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. [...] Any ideea? Maybe i do not use the proper parameters on the command line? May 12 2004
adi <adi_member pathlink.com> wrote in news:c7thhl$1rrj$1 digitaldaemon.com:Unfortunatelly I have to build a console aplication, so I would rather not include wx in my program. May 13 2004
Ok, Thanks for your reply again, I will certainly look over wxWidgetds. I believed it was all about GUI, but i guess i was wrong. Adi In article <c7vlej$2912$1 digitaldaemon.com>, W這dzimierz Skiba says...adi <adi_member pathlink.com> wrote in news:c7thhl$1rrj$1 digitaldaemon.com:Unfortunatelly I have to build a console aplication, so I would rather not include wx in my program. May 17 2004
Try putting the library after main.cpp: dmc main.cpp libexpat.lib You cannot fail if you assume that a linker (including the GNU and Linux and FreeBSD linkers) resolves unknown symbols in one pass: it resolves unknown symbols from each file it processes from left to right on the command line. adi wrote:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. I've used the implib utility. The command line looks like this: dmc -L/libexpat main.cpp The code compiles well, but when i try to link it, i have the following messages: link main,,,user32+kernel32/noi/libexpat; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : LIBEXPAT main.obj(main) Error 42: Symbol Undefined _XML_ParserFree main.obj(main) Error 42: Symbol Undefined _XML_GetCurrentLineNumber main.obj(main) Error 42: Symbol Undefined _XML_ErrorString main.obj(main) Error 42: Symbol Undefined _XML_GetErrorCode main.obj(main) Error 42: Symbol Undefined _XML_Parse main.obj(main) Error 42: Symbol Undefined _XML_SetCharacterDataHandler main.obj(main) Error 42: Symbol Undefined _XML_SetElementHandler main.obj(main) Error 42: Symbol Undefined _XML_SetUserData main.obj(main) Error 42: Symbol Undefined _XML_ParserCreate --- errorlevel 9 Any ideea? Maybe i do not use the proper parameters on the command line? Regards Adi May 12 2004
Thanks again for the fast reply, It does not work this way. I've tried it. I have the same error message. I've tried it even with the linker. I have another question is it possible to use lib files made with another compiler with digital mars or not. It seems that it is not. In article <c7tkms$20id$1 digitaldaemon.com>, -scooter- says...Try putting the library after main.cpp: dmc main.cpp libexpat.lib You cannot fail if you assume that a linker (including the GNU and Linux and FreeBSD linkers) resolves unknown symbols in one pass: it resolves unknown symbols from each file it processes from left to right on the command line. adi wrote:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. I've used the implib utility. The command line looks like this: dmc -L/libexpat main.cpp The code compiles well, but when i try to link it, i have the following messages: link main,,,user32+kernel32/noi/libexpat; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : LIBEXPAT main.obj(main) Error 42: Symbol Undefined _XML_ParserFree main.obj(main) Error 42: Symbol Undefined _XML_GetCurrentLineNumber main.obj(main) Error 42: Symbol Undefined _XML_ErrorString main.obj(main) Error 42: Symbol Undefined _XML_GetErrorCode main.obj(main) Error 42: Symbol Undefined _XML_Parse main.obj(main) Error 42: Symbol Undefined _XML_SetCharacterDataHandler main.obj(main) Error 42: Symbol Undefined _XML_SetElementHandler main.obj(main) Error 42: Symbol Undefined _XML_SetUserData main.obj(main) Error 42: Symbol Undefined _XML_ParserCreate --- errorlevel 9 Any ideea? Maybe i do not use the proper parameters on the command line? Regards Adi May 12 2004
The dm linker works with OMF files, not COFF files. There is a utility to convert from COFF libraries to OMF libraries, coff2omf.exe. www.digitalmars.com/ctg/coff2omf.html Also, scooter is correct in how to specify a library file to dmc. "adi" <adi_member pathlink.com> wrote in message news:c7tv08$2fni$1 digitaldaemon.com...Thanks again for the fast reply, It does not work this way. I've tried it. I have the same error message. I've tried it even with the linker. I have another question is it possible to use lib files made with another compiler with digital mars or not. It seems that it is not. In article <c7tkms$20id$1 digitaldaemon.com>, -scooter- says...Try putting the library after main.cpp: dmc main.cpp libexpat.lib You cannot fail if you assume that a linker (including the GNU and Linux May 12 2004
Thank you all a lot. After converting the lib with coff2omf the executable file is generated. Unfortunatelly the program crashes when I try to parse the file. The one compiled with mingw works well with the same code. I will try and work on it some more. Thank you all Adi. In article <c7u4dk$2npq$1 digitaldaemon.com>, Walter says...The dm linker works with OMF files, not COFF files. There is a utility to convert from COFF libraries to OMF libraries, coff2omf.exe. www.digitalmars.com/ctg/coff2omf.html Also, scooter is correct in how to specify a library file to dmc. "adi" <adi_member pathlink.com> wrote in message news:c7tv08$2fni$1 digitaldaemon.com...Thanks again for the fast reply, It does not work this way. I've tried it. I have the same error message. I've tried it even with the linker. I have another question is it possible to use lib files made with another compiler with digital mars or not. It seems that it is not. In article <c7tkms$20id$1 digitaldaemon.com>, -scooter- says...Try putting the library after main.cpp: dmc main.cpp libexpat.lib You cannot fail if you assume that a linker (including the GNU and Linux May 12 2004
adi wrote:Thanks again for the fast reply, It does not work this way. I've tried it. I have the same error message. I've tried it even with the linker. I have another question is it possible to use lib files made with another compiler with digital mars or not. It seems that it is not. May 12 2004
Just recompile the expat code into a .LIB and include that .LIB in your link command. I have used expat with DMC for years! Jan adi wrote:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. I've used the implib utility. The command line looks like this: dmc -L/libexpat main.cpp The code compiles well, but when i try to link it, i have the following messages: link main,,,user32+kernel32/noi/libexpat; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : LIBEXPAT main.obj(main) Error 42: Symbol Undefined _XML_ParserFree main.obj(main) Error 42: Symbol Undefined _XML_GetCurrentLineNumber main.obj(main) Error 42: Symbol Undefined _XML_ErrorString main.obj(main) Error 42: Symbol Undefined _XML_GetErrorCode main.obj(main) Error 42: Symbol Undefined _XML_Parse main.obj(main) Error 42: Symbol Undefined _XML_SetCharacterDataHandler main.obj(main) Error 42: Symbol Undefined _XML_SetElementHandler main.obj(main) Error 42: Symbol Undefined _XML_SetUserData main.obj(main) Error 42: Symbol Undefined _XML_ParserCreate --- errorlevel 9 Any ideea? Maybe i do not use the proper parameters on the command line? Regards Adi May 12 2004
Perhaps this is the next step I will try as the executable file still crashes when I try to parse the file (the odd thing is that it creates the parser without problems). Thanks Adi In article <c7umbv$q49$1 digitaldaemon.com>, Jan Knepper says...Just recompile the expat code into a .LIB and include that .LIB in your link command. I have used expat with DMC for years! Jan adi wrote:I've tried to use expat with digital mars compiler, but it seems not to recognise the libraries. I've used the implib utility. The command line looks like this: dmc -L/libexpat main.cpp The code compiles well, but when i try to link it, i have the following messages: link main,,,user32+kernel32/noi/libexpat; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : LIBEXPAT main.obj(main) Error 42: Symbol Undefined _XML_ParserFree main.obj(main) Error 42: Symbol Undefined _XML_GetCurrentLineNumber main.obj(main) Error 42: Symbol Undefined _XML_ErrorString main.obj(main) Error 42: Symbol Undefined _XML_GetErrorCode main.obj(main) Error 42: Symbol Undefined _XML_Parse main.obj(main) Error 42: Symbol Undefined _XML_SetCharacterDataHandler main.obj(main) Error 42: Symbol Undefined _XML_SetElementHandler main.obj(main) Error 42: Symbol Undefined _XML_SetUserData main.obj(main) Error 42: Symbol Undefined _XML_ParserCreate --- errorlevel 9 Any ideea? Maybe i do not use the proper parameters on the command line? Regards Adi May 12 2004
adi wrote:Perhaps this is the next step I will try as the executable file still crashes when I try to parse the file (the odd thing is that it creates the parser without problems). May 17 2004
-scooter- wrote:DMC, in my experience, has found bugs in my code far better than GCC. But I don't work solely under Win32. The moral of the story: use different compilers to make your code more robust. :-) May 17 2004
Jan Knepper wrote:-scooter- wrote: May 19 2004
-scooter- wrote:Unfortunately, there's no version of DMC for FreeBSD. Although, if Walter does output proper ELF object files for Linux, there's no reason why the same compiler couldn't work under FreeBSD. May 20 2004
|