Dev C++ linker error: undefined reference
This is the first time Ive done any programming since a few classes 6 years ago, so the answer is likely to be pretty basic.
I am compliling a Text editor in Dev C++ and getting the following error:
[Linker error] undefined reference to `SetLayeredWindowAttributes@16'
I have found that SetLayeredAttributes resides in user32.lib and the windows.h header file.
I believe SetLayeredWindowAttributes@16 is comming from user32.def file. This is the only file on my computer that include the whole string. (It shows up a number of times minus the @16)
The linker has the following switches:
-lkernel32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32 -lShlwapi -lopengl32 -lglu32 -luser32
../../lib/libuser32.a (<-- I added this one hopping to force recognition)
No where in my code do I directly access this method, not certain which one of the includes is calling it.
I dont have a clue what to try from here. Any help would be greatly appreciated.
Salems suggestion still didnt work
I didnt like the solution, because it will mask any future changes to this system include, but at I needed to try something.
into one of my header files.
I no longer get the previous problem. Now I get
invalid conversion from `DWORD (*)(void*)' to `DWORD (*)(void*)'
Huh? Its complaining because of an invalid conversion from type A to type A? What am I missing here?
sorry, should include some info
You probably cant help much without info on the line in question...
glData->hThread = CreateThread(NULL, 0, glLogoDrawThread, glData, 0, &glData->dwThread); // create the rendering thread
struct gldata_t *glData = (struct gldata_t *)LocalAlloc(LPTR, sizeof(struct gldata_t));
Thanks for whatever help anyone can render.