c++.command-line - Linking Errors
- Brian S (22/22) Feb 04 2007 I am trying to compile a simple program to test drawing an image
- Bertel Brander (9/35) Feb 04 2007 You need to link in the library for those functions,
I am trying to compile a simple program to test drawing an image in a window. Compiling the source and resource are fine, but when I try to link I get these errors: C:\dm\Programs\Bmp1>dmc -L/exet:nt/su:windows bmp1.obj bmp1.res bmp1.exe link bmp1,bmp1,,user32+kernel32/RC:bmp1/noi/exet:nt/su:windows; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved bmp1.obj(bmp1) Error 42: Symbol Undefined _DeleteObject 4 bmp1.obj(bmp1) Error 42: Symbol Undefined _DeleteDC 4 bmp1.obj(bmp1) Error 42: Symbol Undefined _SelectObject 8 bmp1.obj(bmp1) Error 42: Symbol Undefined _BitBlt 36 bmp1.obj(bmp1) Error 42: Symbol Undefined _GetObjectA 12 bmp1.obj(bmp1) Error 42: Symbol Undefined _CreateCompatibleDC 4 --- errorlevel 6 I think I need to include something, but I dont know what.
Feb 04 2007
Brian S skrev:I am trying to compile a simple program to test drawing an image in a window. Compiling the source and resource are fine, but when I try to link I get these errors: C:\dm\Programs\Bmp1>dmc -L/exet:nt/su:windows bmp1.obj bmp1.res bmp1.exe link bmp1,bmp1,,user32+kernel32/RC:bmp1/noi/exet:nt/su:windows; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved bmp1.obj(bmp1) Error 42: Symbol Undefined _DeleteObject 4 bmp1.obj(bmp1) Error 42: Symbol Undefined _DeleteDC 4 bmp1.obj(bmp1) Error 42: Symbol Undefined _SelectObject 8 bmp1.obj(bmp1) Error 42: Symbol Undefined _BitBlt 36 bmp1.obj(bmp1) Error 42: Symbol Undefined _GetObjectA 12 bmp1.obj(bmp1) Error 42: Symbol Undefined _CreateCompatibleDC 4 --- errorlevel 6 I think I need to include something, but I dont know what.You need to link in the library for those functions, which is Gdi32.lib Try: dmc -L/exet:nt/su:windows bmp1.obj bmp1.res gdi32.lib bmp1.exe -- Just another homepage: http://damb.dk But it's mine - Bertel
Feb 04 2007