User forums > Using Code::Blocks

File dependencies using Code:Blocks IDE for windows

(1/1)

fusion640:
I have a C program that I have written, but want to set up a GUI for user data entry using 64 bit windows. (not using the console window). Trying to learn some Win API stuff from Petzgold's book Programming Windows 5th edition (I also have the CD that came with it).  I am having quite a bit of trouble with the examples in the book with regards to dependencies. Can someone who has used the book point me to a source of information on how to properly set up Code:Blocks to work with the examples in the book (from the CD)?  I will admit to jumping the gun with my program just being a .c file, as I did not make it a project file to start with. I am an old geezer (65), self taught, not above groveling, previous hobby programmer with visual basic 4, but learned enough C to write a functioning program. Too old and desire not to learn C++ just to get a GUI.   

ollydbg:
Hi, there are many many tutorials on the internet, for example:

Windows GUI Programming with C/C++ ( Win32 API ) | Part -1 | Creating a window - YouTube

You can find even more tutorials. Hope that helps.

Miguel Gimenez:
When the linker complains about missing functions google function's name. For example. if the missing function is called CreateWindowEx, you will find links to pages about it (or it ended in A or W). In this case, use https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createwindowexa. At the end of the page you have a Requirements section, and it says the function is in the user32.lib library.

Add this library (or user32.a if you are using MinGW) to Projects -> Build options -> Linker settings -> Link libraries.

Navigation

[0] Message Index

Go to full version