User forums > Help

Trouble compiling/linkng wx library

(1/2) > >>

Charlie:
Hi. I have just installed CodeBlocks and am having trouble building my first project. Whenever I try I get the following errors:

||=== Build: Debug in Project1 (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lwxmsw31ud|
ld.exe||cannot find C:\wxWidgets-3.2.1\lib\gcc_dll\mswu: Permission denied|
ld.exe||cannot find C:\wxWidgets-3.2.1\lib\gcc_dll\mswud: Permission denied|
||error: ld returned 1 exit status|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|

wxWidgets is installed in the root (C) directory and the file structure is exactly according to the error message. Then there are the "Permission denied" errors, but the access rights are fine. Can anyone help me with this? Thanks in anticipation.

Miguel Gimenez:
Post a full rebuild log in code tags, see this link

Charlie:

-------------- Clean: Debug in Project1 (compiler: GNU GCC Compiler)---------------

Cleaned "Project1 - Debug"

-------------- Build: Debug in Project1 (compiler: GNU GCC Compiler)---------------

g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud -c C:\Users\paul\Development\CodeBlocks\Project1\Project1App.cpp -o obj\Debug\Project1App.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud -c C:\Users\paul\Development\CodeBlocks\Project1\Project1Main.cpp -o obj\Debug\Project1Main.o
windres.exe -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud  -J rc -O coff -i C:\Users\paul\DEVELO~1\CODEBL~1\Project1\resource.rc -o obj\Debug\resource.res
g++.exe -LC:\wxWidgets-3.2.1\lib\gcc_dll -o bin\Debug\Project1.exe obj\Debug\Project1App.o obj\Debug\Project1Main.o  obj\Debug\resource.res -mthreads  -lwxmsw31ud C:\wxWidgets-3.2.1\lib\gcc_dll\mswu C:\wxWidgets-3.2.1\lib\gcc_dll\mswud -mwindows
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31ud
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find C:\wxWidgets-3.2.1\lib\gcc_dll\mswu: Permission denied
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find C:\wxWidgets-3.2.1\lib\gcc_dll\mswud: Permission denied
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 19 second(s))
4 error(s), 0 warning(s) (0 minute(s), 19 second(s))
 

Miguel Gimenez:
Looks like you missed the code tags part of the link.

These directories should not be in the linker command line, it is trying to open them as libraries:

--- Code: ---C:\wxWidgets-3.2.1\lib\gcc_dll\mswu
C:\wxWidgets-3.2.1\lib\gcc_dll\mswud

--- End code ---
Did you put them in the "Other linker options" box, near -mthreads? (they may be disguised as $(#wx32.lib)\mswu and $(#wx32.lib)\mswud). If so, remove them.

Charlie:

-------------- Clean: Debug in Project1 (compiler: GNU GCC Compiler)---------------

Cleaned "Project1 - Debug"

-------------- Build: Debug in Project1 (compiler: GNU GCC Compiler)---------------

g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud -c C:\Users\paul\Development\CodeBlocks\Project1\Project1App.cpp -o obj\Debug\Project1App.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud -c C:\Users\paul\Development\CodeBlocks\Project1\Project1Main.cpp -o obj\Debug\Project1Main.o
windres.exe -IC:\wxWidgets-3.2.1\include -IC:\wxWidgets-3.2.1\lib\gcc_dll\mswud  -J rc -O coff -i C:\Users\paul\DEVELO~1\CODEBL~1\Project1\resource.rc -o obj\Debug\resource.res
g++.exe -LC:\wxWidgets-3.2.1\lib\gcc_dll -o bin\Debug\Project1.exe obj\Debug\Project1App.o obj\Debug\Project1Main.o  obj\Debug\resource.res -mthreads  -lwxmsw31ud -mwindows
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw31ud
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 23 second(s))
2 error(s), 0 warning(s) (0 minute(s), 23 second(s))
 

Navigation

[0] Message Index

[#] Next page

Go to full version