|
From: SourceForge.net <no...@so...> - 2003-11-14 02:05:39
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2285736 By: mrfelis I hope someone can help me with this error. Any help would be appreciated. Using this sample: #define WINVER 0x500 #include <windows.h> #include <wingdi.h> int main() { HDC hDC, hMemDC; int x,y,w,h; UINT color; TransparentBlt(hDC, x, y,w,h, hMemDC, 0, 0,w,h , color); } First, I'm my C/C++ is really rusty. I haven't done any serious C development since taking a VB position over 5 years ago. I know remember enough to realise this is a linker error, and I've searched all over the Web but alll I'm finding are instructions to include the library msimg32.lib in a VC project. Other than providing the proper libary it hasn't helped. :( I found the actual declaration of the function in the windgi.h file supplied in w32api-2.4.tar.gz and I can compile with the -c flag, so I'm pretty sure that the problem is in the library or my commandline. Here's the commands that I've tried: >g++ -mwindows -c sample.cpp <- generates sample.o so the code does compile The following fail: >g++ -mwindows -lmsimg32 sample.cpp >g++ -mwindows -L c:\mingw\lib\libmsimg32.a sample.cpp >g++ -mwindows -Lc:\mingw\lib\libmsimg32.a sample.cpp The output is always this line: C:\DOCUME~1\Rich\LOCALS~1\Temp/ccOGaaaa.o(.text+0x41):sample.cpp: undefined reference to `TransparentBlt@44' I'm using GCC: Reading specs from C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c++,f77,objc --disable-win32-registry --disable-shared --enable-sjlj-exceptions Thread model: win32 gcc version 3.2.3 (mingw special 20030504-1) ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=286641 |