From: Andrew S K. (tb) <aka...@gm...> - 2009-05-15 03:40:47
My program has the following:
#include <windows.h>
And later on,
LineTo( hDC, sx+2, sy+h+2 );
And when I link, I get the error:
[Linker error] undefined reference to `LineTo@12'
NOTE: I am creating my own DLL and I want it to access the Windows DLL.
A. K.
Not sure what you mean.
You say that you get the error when you are linking, so are you bulding an
EXE file or a DLL?
The linking step is for an EXE file, and then you must add a reference to
used libraries - this also includes any Windows libraries used. It is only
the RTL libraries part of the language that the linker may pick up
automatically.
/pwm
On Thu, 14 May 2009, Andrew S Katz (tb) wrote:
> My program has the following:
>
> #include <windows.h>
>
> And later on,
> LineTo( hDC, sx+2, sy+h+2 );
>
> And when I link, I get the error:
> [Linker error] undefined reference to `LineTo@12'
>
> NOTE: I am creating my own DLL and I want it to access the Windows DLL.
>
> A. K.
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
From: Andrew S K. (tb) <aka...@gm...> - 2009-05-15 13:56:39
Replying to my own thread to say I found the answer.
It is simple - http://www.uniqueness-template.com/devcpp/ This site
tells me:
# Go to "Project" menu and choose "Project Options" (or just press ALT+P).
# Go to the "Parameters" tab
# In the "Linker" field, enter the following text:
-lgdi32
Andy
Andrew S Katz (tb) said the following on 5/14/2009 11:40 PM:
> My program has the following:
>
> #include <windows.h>
>
> And later on,
> LineTo( hDC, sx+2, sy+h+2 );
>
> And when I link, I get the error:
> [Linker error] undefined reference to `LineTo@12'
>
> NOTE: I am creating my own DLL and I want it to access the Windows DLL.
>
> A. K.
>
>