User forums > Help

-lcomdlg32 missing

(1/1)

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:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Post a full rebuild log if you want help.

Tim S.

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))
--- End quote ---

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:

--- 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))

--- End quote ---

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version