473,411 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

API function won't compile using CYGWIN g++; Interpreting error message

I'm using CYGWIN g++. I'm having trouble making an API call the
WindowFromPoint function.
Here is my code.
FILE: t.cc
#include <windows.h>
int main () {

POINT p;
p.x=200;
p.y=200;

HWND window_handle;

window_handle = WindowFromPoint(p);

return 0;
}
Here is the error message I'm getting:

C:\DOCUME~1\jeff\LOCALS~1\Temp\ccIIB5F0.o(.text+0x 22):t.cc: undefined
reference to 'WindowFromPoint@8'

Could someone please tell me
1)What this error means, specifically, and;

2)What I need to do to fix it

Thank you
Jeff
Nov 14 '05 #1
3 3767
On 31 Jan 2004 13:01:03 -0800, ha****@erols.com (Roger Sherman) wrote:
I'm using CYGWIN g++. I'm having trouble making an API call the
WindowFromPoint function.
Here is my code.
FILE: t.cc
#include <windows.h>
int main () {

POINT p;
p.x=200;
p.y=200;

HWND window_handle;

window_handle = WindowFromPoint(p);

return 0;
}
Here is the error message I'm getting:

C:\DOCUME~1\jeff\LOCALS~1\Temp\ccIIB5F0.o(.text+0 x22):t.cc: undefined
reference to 'WindowFromPoint@8'

Could someone please tell me
1)What this error means, specifically, and;

2)What I need to do to fix it

Thank you
Jeff

See the answers you get to the same question in
alt.comp.lang.learn.c-c++. If you must post to multiple groups, do it
with a single message, not an individual one to each group.
<<Remove the del for email>>
Nov 14 '05 #2
Hello,

"Roger Sherman" <ha****@erols.com> a écrit dans le message de news:
5c**************************@posting.google.com...
I'm using CYGWIN g++. I'm having trouble making an API call the
WindowFromPoint function.
Here is my code.
FILE: t.cc
#include <windows.h>
int main () {

POINT p;
p.x=200;
p.y=200;

HWND window_handle;

window_handle = WindowFromPoint(p);

return 0;
}
Here is the error message I'm getting:

C:\DOCUME~1\jeff\LOCALS~1\Temp\ccIIB5F0.o(.text+0x 22):t.cc: undefined
reference to 'WindowFromPoint@8'

Could someone please tell me
1)What this error means, specifically, and;
Although it's not a C problem as it's commonly discussed here, I *can* think
it's a linkage problem.
The linker can't resolve this name (WindowFromPoint) because you didn't
specify to your linker the library in which this function is stored.
2)What I need to do to fix it


You need to link your program with user32.lib

best regards, regis
Nov 14 '05 #3
Roger Sherman wrote:

I'm using CYGWIN g++. I'm having trouble making an API call the
WindowFromPoint function.
Here is my code.

FILE: t.cc
sounds like a C++, not C program.
#include <windows.h>
definitely non-standard header.
int main () {

POINT p;
undefined type POINT
p.x=200;
p.y=200;

HWND window_handle;
Undefined type HWND. declaring variable after executable code.

window_handle = WindowFromPoint(p);
Undeclared function.

return 0;
}
Here is the error message I'm getting:

C:\DOCUME~1\jeff\LOCALS~1\Temp\ccIIB5F0.o(.text+0x 22):t.cc: undefined
reference to 'WindowFromPoint@8'
Now we know you are using a C++ compiler. Off topic on c.l.c

Could someone please tell me
1)What this error means, specifically, and;

2)What I need to do to fix it


Get thee to a newsgroup where this is topical. The windows
contamination means c.l.c++ is not it. That, and the c++ code,
means c.l.c is not it. Maybe you should look for a group with the
word 'windows' in it.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DvDmanDT | last post by:
Hello, I have an intresting problem: I want to let users upload sourcecode and then compile it using my cygwin gcc... But one thing at a time... I can't get that gcc to execute... ...
9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
0
by: RPS | last post by:
Hi, I'm using CYGWIN g++. I'm having trouble making an API call the WindowFromPoint function. Here is my code. FILE: t.cc #include <windows.h> int main () {
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
3
by: Abby | last post by:
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my editor. The reason why I chose Cygwin compiler instead of the compiler that came with Dev-C++ is that I believe it uses the same...
17
by: I.M. !Knuth | last post by:
Hi. I'm more-or-less a C newbie. I thought I had pointers under control until I started goofing around with this: ...
0
by: Jérôme Le Bougeant | last post by:
Hello (and sorry for my English), I downloaded the VideoCapture module on the http://videocapture.sourceforge.net/ site. I tested it with a webcam and that functions. Now I want to...
2
by: James Calivar | last post by:
Hi, I'm trying to compile PHP v5.1.6 under Windows XP using cygwin. I get the following error when I run ./configure. Can anyone help please? $ ./configure loading cache ./config.cache...
0
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.