pocketcpp icon indicating copy to clipboard operation
pocketcpp copied to clipboard

gdi+ and windows errors

Open johnshadow23 opened this issue 8 years ago • 2 comments

When I was using gdiplus and just gdi a few errors came up on me :? I have no idea how to fix them. EX: C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0xa5): undefined reference to __imp_CreateCompatibleDC' C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0xc2): undefined reference to_imp_CreateCompatibleBitmap' C:\Users\JOHNS~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0xda): undefined reference to __imp_SelectObject' C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x108): undefined reference to_imp_GetStockObject' C:\Users\JOHNS~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x136): undefined reference to __imp_SelectObject' C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x146): undefined reference to_imp_DeleteDC' C:\Users\JOHNS~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x1a9): undefined reference to __imp_CreateCompatibleDC' C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x1c1): undefined reference to_imp_SelectObject' C:\Users\JOHNS~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x20c): undefined reference to __imp_BitBlt' C:\Users\JOHNS_~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x220): undefined reference to_imp_SelectObject' C:\Users\JOHNS~1\AppData\Local\Temp\cckUtaZ9.o:graphics_Test.cpp:(.text+0x230): undefined reference to `__imp_DeleteDC' I would Like to know If these can be fixed, or if I have to include something to fix them.

johnshadow23 avatar Oct 15 '15 00:10 johnshadow23

Hi @johnshadow23, are you using the compiler from the command line? or are you compiling from the Notepad++ editor?

If you are compiling from Notepad++, you should take care about the command line options, they are specified in the pocketcpp\npp\plugins\config\npes_saved.txt:

::Compile C++ File
NPP_SAVE
g++ -o "$(CURRENT_DIRECTORY)\$(NAME_PART)" "$(FULL_CURRENT_PATH)" -static

I think you need User32 library (-luser32 link parameter), anyway I don't know if you can use gdi+ from g++ (mingw). Do you have an .a library for gdi+?

dacap avatar Oct 15 '15 14:10 dacap

I'm using the one from notepad++ (Sorry I have been doing a lot of things lately and have not been able to respond.) no I do not have a .a file for gdi? How would I get one?

johnshadow23 avatar Oct 17 '15 03:10 johnshadow23