Home > Linker Error > Linker Error Undefined Reference To Getstockobject 4

Linker Error Undefined Reference To Getstockobject 4

SMF 2.0.12 | SMF © 2016, Simple Machines XHTML RSS WAP2 Jump to content Google Sign in options Remember me This is not recommended for shared computers Sign in anonymously Don't Browse other questions tagged c windows winapi gcc or ask your own question. Looking at "GetStockObject" in the Windows SDK I see you need to add GDI32.LIB. Where did gcc find those functions? –Snuff Movie Sep 29 '12 at 11:10 The documentation didn't help much in this case, unfortunately. navigate to this website

Oct 30 '09 #2 reply P: 2 muddy22 That didn't fix the problem, here is all of the work i've done. And it's install seems to work fine.The problem is cropping up when I try to compile under cb (svn build #3337, Dec 4, 2006). What could make an area of land be accessible only at certain times of the year? Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. http://cboard.cprogramming.com/windows-programming/63630-[linker-error]-undefined-reference-%[email protected]

Thanks again. The Strawdog's out in the street Reply With Quote October 9th, 2005,09:12 AM #8 Paul McKenzie View Profile View Forum Posts Elite Member Power Poster Join Date Apr 1999 Posts 27,449 In a Win32 console app, you can create message boxes, windows, menus, dialog boxes, select or save files/print/choose fonts, etc.

The part that i'm having a problem with is this: int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR CmdLine, int CmdShow); ;{ static WNDCLASS Wc; memset(&Wc,0,sizeof(Wc)); static MSG Msg; memset(&Msg,0,sizeof(Msg)); Wc.style=CS_HREDRAW Select in the Menu bar "Project/"Project Options", a dialog box pops up and you will see right away what is the type of your project. Oct 30 '09 #1 Post Reply Share this Question 4 Replies Expert Mod 5K+ P: 8,916 Banfa Remove the ; at the end of the previous line and the beginning of It also has the folowing line: wndclassex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); The call to GetStockObject() produces a compiler error: Z:/mtsts_workspace/MTSTS/Debug/../WinMain.c:29: undefined reference to `[email protected]' Has anyone an idea what's wrong ?

Get a proper OS!"), szAppName, MB_ICONERROR); return -1; } hwnd = CreateWindow ( szAppName, Quick Navigation Windows Programming Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums General Programming Boards C++ Programming C Programming C# Programming Game Programming Networking/Device Communication By Matt3000 in forum C Programming Replies: 12 Last Post: 07-07-2006, 04:42 PM c++ linking problem for x11 By kron in forum Linux Programming Replies: 1 Last Post: 11-19-2004, 09:18 AM http://forums.codeguru.com/showthread.php?360123-Linker-error-undefined-reference-to-GetStockObject-4 Somewhere along the line, Gdi32 gets munged into libgdi32.a.

You cannot reply to this topic 4 replies to this topic #1 caldiar Members -Reputation: 715 Like 0Likes Like Posted 17 March 2005 - 05:38 PM Hey everyone. What to do with my out of control pre teen daughter Is there a word for spear-like? Join our community for more solutions or to ask questions. Can anyone who has successfully integrated GRX with cb tell me what they did?Thanks in advance,Matt(fwiw, running on cb on winxp) Logged raph Almost regular Posts: 242 Re: Getting GRX to

If Dev-C++ doesn't link in the correct library if "Win32 Console" is selected, then that is a bug in Dev-C++. I thought the headers would also tell were the actual functions were located ie, gdi32.dll... In fact, it doesn't do any work, as far as I can tell. 2. Join them; it only takes a minute: Sign up How do I link to libraries when compiling a win32 project with gcc?

What compiler I need to use? useful reference Den. Make sure you have include Windows.h (directly or indirectly). Compiling GRX---------------- 1) Go to GRX base dir and edit "makedefs.grx" to customize it for your system. 2) Switch to "src" sub dir 3) run 'make -f ':

Good luck getting DirectX to work with Dev-C++. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily. A… C++ Introduction to C++: Functions - Passing by Value vs Reference Video by: Ian The goal of the video will be to teach the user the difference and consequence of my review here You're the man! ^_^ [r.D] 0 Write Comment First Name Please enter a first name Last Name Please enter a last name Email We will never share this with anyone.

Now type that in google, and start looking for .lib or .dll, or even .a references. IDE: Dev-C++ 4.9.9.1 (latest) ----[INFO]---- ----[ERROR]---- [Linker error] undefined reference to `[email protected]' ----[ERROR]---- ----[CODE]---- #include LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE Copyright Quinstreet Inc. 2002-2016 current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Trying to get the sourcecode to a small RPG this guy sent to me to work.

Another way is to check the presence or absence of "-mwindows" in Makefile.win on the line starting with "LIBS". "-mwindows" is required for Windows libraries. I didn't port drawing functions from BGI driver as they are already implemented in GRX.I took only printing part which is now rather heavily modified to get rid of Borland C++ I'm not sure that GetStockObject is available for a "Win32 Console" project. more hot questions question feed lang-c about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

And are you compiling a project or just a file? Now if you try this and recompile you will be left with the sound ones. From Readme:QuoteB. get redirected here For the remaining errors, do the same thing, and you will see a reference to "winmm.dll".

Thanks in advance, [r.D] 0 Question by:DrWarezz Facebook Twitter LinkedIn Google LVL 86 Best Solution byjkr >>can you spot anything obvious with the code You are missing the call to 'DefWindowProc()' Otherwise read through the documentation that came with the compiler or google. "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works I just thought it was a matter of specifiyng what libs and functions in those libs which would all follow the ANSI C and windows standards.. Back to top #4 caldiar Members -Reputation: 715 Like 0Likes Like Posted 17 March 2005 - 05:59 PM Dude, you rock!I should have asked sooner and saved myself the trouble

Search Engine Optimisation provided by DragonByte SEO v2.0.32 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd. Reply With Quote October 8th, 2005,07:46 PM #4 CppMaster View Profile View Forum Posts Junior Member Join Date Oct 2005 Posts 19 Re: [Linker error] undefined reference to `[email protected]' It should