News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

-lcomdlg32 missing

Started by mutale, August 23, 2016, 02:59:01 AM

Previous topic - Next topic

mutale

i added graphic.h,  libbgi.a and winbgim.h to codeblocks and when i want to use the graphic.h in my program am being told -lcomdlg is missing.. i do not know what to do... have added all the -lole32 and such filles to my compliler but it still gives me the error " id.exe can not find -lcomdlg32.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PL_Andrev

Hi,

I have similar (?) problem - examples from downloading site:
https://www.youtube.com/watch?v=FxCdMM9H66I
are not started due missing lcmdlg32 (maybe mistake at the topic name).

Build log (still using XP :)

Quote
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

mingw32-g++.exe   -c "D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp" -o "D:\Mines!_C_plusplus\test_gui\Test Winbgim.o"
D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp: In function 'int main(int, char**)':
D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp:11:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  outtextxy(50,100,"Graphics in CodeBlocks");// print text in window graphics
                                           ^
mingw32-g++.exe  -o "D:\Mines!_C_plusplus\test_gui\Test Winbgim.exe" "D:\Mines!_C_plusplus\test_gui\Test Winbgim.o"  -lbgi -lgdi32 -lcmdlg32 -luuid -loleaut32 -lole32  "C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a"
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find -lcmdlg32
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 3 second(s))

BlueHazzard

Well, the linker (not part of codeblocks, but part of your compiler environment) tells you, that he can not find the library "-lcmdlg32".
To solve your problem you have to tell the linker where he can find this library.

The right way to do this is by adding the path to the library in
Project->Build options->Search directories->Linker->Add

gretings

stahta01

#4
Quote from: PL_Andrev on December 02, 2016, 06:20:42 PM
Hi,

I have similar (?) problem - examples from downloading site:
https://www.youtube.com/watch?v=FxCdMM9H66I
are not started due missing lcmdlg32 (maybe mistake at the topic name).

Build log (still using XP :)

Quote
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

mingw32-g++.exe   -c "D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp" -o "D:\Mines!_C_plusplus\test_gui\Test Winbgim.o"
D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp: In function 'int main(int, char**)':
D:\Mines!_C_plusplus\test_gui\Test Winbgim.cpp:11:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  outtextxy(50,100,"Graphics in CodeBlocks");// print text in window graphics
                                           ^
mingw32-g++.exe  -o "D:\Mines!_C_plusplus\test_gui\Test Winbgim.exe" "D:\Mines!_C_plusplus\test_gui\Test Winbgim.o"  -lbgi -lgdi32 -lcmdlg32 -luuid -loleaut32 -lole32  "C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a"
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find -lcmdlg32
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 3 second(s))

You are likely the one with the typo.

I created this git repo/project to help someone about 3 years ago.
https://github.com/stahta01/windows-games

Edit: I no longer remember what I did; so, I hope it works right.

Edit2: Link to text directions I found; http://www.codeincodeblock.com/2011/09/how-to-setup-winbgim-library-in.html
I dislike video; since, my sound card died it is amazing how much info is in sound in Videos.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]