User forums > General (but related to Code::Blocks)
mingw32 and Xrender
alexo:
hello forum,
I'm trying to cross compile with mingw32.
When I try to compile a hello world toy program I get a build log message saying the linker cannot find the Xrender lib.
this is the build instruction automatically given by the compile project button:
--- Code: ---i586-mingw32msvc-g++ -I/usr/local/include -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -g -I/usr/i586-mingw32msvc/bin -c /home/alessandro/Documenti/ProgC/AVOrder/main.cpp -o obj/Debug/main.o
i586-mingw32msvc-g++ -L/usr/i586-mingw32msvc/lib -o bin/Debug/AVOrder obj/Debug/main.o /usr/local/lib/libfltk.a -lXrender -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/ld: cannot find -lXrender
--- End code ---
how can I strip this lib from the compiler build string ?
stahta01:
Remove where you added the lib in the past.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_What_do_I_need_to_know_when_using_3rd_party_libs.3F
alexo:
where can I modify the build and linker string?
I'm sorry but I can't see how to edit those lines. They are automatically built.
oBFusCATed:
Project -> Build options -> <your target> -> Linker
and/or
Project -> Build options -> <your target> -> Search paths -> Linker.
alexo:
Both those fields are empty. But in compilation I still get those long list of library links.
I added the path to the folder containing the libXrender in the project->build options->search-directories->Linker tab and now it works.
Now I have a new problem.
I'm trying to build a FLTK program for the windows platform. No problems building it with gcc for linux.
The trouble is that the compiler complains she can find the header files with the function definitions.
How do I insert the folder where to find these header files?
--- Code: ---||=== Build: Debug in FLTK_Test (compiler: MingW32) ===|
obj/Debug/main.o:main.cpp|| undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'|
obj/Debug/main.o:main.cpp|| undefined reference to `Fl_Box::Fl_Box(int, int, int, int, char const*)'|
obj/Debug/main.o:main.cpp|| undefined reference to `Fl_Group::end()'|
obj/Debug/main.o:main.cpp|| undefined reference to `Fl_Window::show(int, char**)'|
obj/Debug/main.o:main.cpp|| undefined reference to `Fl::run()'|
||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
--- End code ---
Thank you
Navigation
[0] Message Index
[#] Next page
Go to full version