Author Topic: -lcomdlg32 missing  (Read 4682 times)

mutale

  • Guest
-lcomdlg32 missing
« on: August 23, 2016, 02:59:01 am »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: -lcomdlg32 missing
« Reply #1 on: August 23, 2016, 05:20:33 am »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

PL_Andrev

  • Guest
Re: -lcomdlg32 missing
« Reply #2 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))

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: -lcomdlg32 missing
« Reply #3 on: December 02, 2016, 08:53:34 pm »
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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: -lcomdlg32 missing
« Reply #4 on: December 03, 2016, 01:09:07 am »
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.
« Last Edit: December 03, 2016, 01:25:46 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org