User forums > Help

Beginner: undefined reference to vswscanf...

(1/1)

hexadecimal:
Hello everybody, I'm a completely beginner with Code :: Blocks and I get this build log when I try to compile with mingw-w64-project.


||=== Build: Debug in Instalador (compiler: GNU GCC Compiler) ===|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_fmapbase.o):fmapbase.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_string.o):string.cpp|| undefined reference to `__mingw_wcstod'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_txtstrm.o):txtstrm.cpp|| undefined reference to `__mingw_wcstod'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswprintf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vsscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vsscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswprintf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vsscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vsscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_wxcrt.o):wxcrt.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_xlocale.o):xlocale.cpp|| undefined reference to `__mingw_wcstod'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_xlocale.o):xlocale.cpp|| undefined reference to `__mingw_strtod'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_basemsw.o):basemsw.cpp|| undefined reference to `__mingw_vfwprintf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_fontutil.o):fontutil.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_msw_textctrl.o):textctrl.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_colourcmn.o):colourcmn.cpp|| undefined reference to `__mingw_vsscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_colourcmn.o):colourcmn.cpp|| undefined reference to `__mingw_vswscanf'|
C:\wxWidgets-3.0.3\lib\gcc_lib\libwxmsw30u.a(monolib_xpmdecod.o):xpmdecod.cpp|| undefined reference to `__mingw_vsscanf'|
||error: ld returned 1 exit status|
||=== Build failed: 22 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===


I searched the forum, the most similar thing I've seen has been this:
http://forums.codeblocks.org/index.php?topic=15436.0
But I already have the compiled libraries, or so I think, I have gcc_mswu and gcc_mswud folders in build/msw
Could this be a linker error or in relation to compiler options?

Sorry for my english.
Thanks in advance.

oBFusCATed:
If you've not compiled wxwidgets yourself then you're most probably mixing compilers which is not a good idea.
You'll have to use the wxwidgets' compiler or rebuild wxwidgets with your compiler.

p.s. This is topic is violating our forum's rules, because it is generic programming question!

hexadecimal:
How could I not have compiled wxwidgets? It would help to respond with the most appropriate compiler, a response that should be simple. It seems the right place to do this question since there is no error during compilation but if it is presented in the IDE I am also sure that I compiled with this compiler.

sodev:

--- Quote from: hexadecimal on May 11, 2017, 01:42:36 pm ---How could I not have compiled wxwidgets?
--- End quote ---

You could have downloaded a binary release? Well, its quite easy to figure out if you compiled wxWidgets or not. Have you ever typed something like that in the build directory of a wxWidgets source tree:

--- Code: ---mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
--- End code ---
Yes? You compiled wxWidgets. No? You did not compile wxWidgets.


--- Quote ---It would help to respond with the most appropriate compiler, a response that should be simple.
--- End quote ---

Your linker errors indicate that c library functions cannot be found, this can either be the highly unlikely case that you explicit dont link the standard c library or the very likely case that you have a compiler mismatch and the functions cannot be found because of different name mangling.

So the most appropriate compiler is the one that was used to compile wxWidgets, since you didnt tell us which compiler that was, no one can give you an answer.


--- Quote ---It seems the right place to do this question since there is no error during compilation but if it is presented in the IDE I am also sure that I compiled with this compiler.

--- End quote ---
My magical skills end here, i dont know what you are saying here. Your post indicates a linker error, CodeBlocks != (compiler || linker), here you can only receive support for CodeBlocks issues, please go to a forum for c++ programming beginners to get aid to solve your compiler and linker issues.

stahta01:

--- Quote ---Could this be a linker error or in relation to compiler options?
--- End quote ---
Edit: Since you failed to post the build log; no one can answer this question!


FYI: I have had linking [errors] that are not like the above compiling monolithic wxWidgets DLL/Shared with MinGW64 that I traced to the MinGW64 C-Runtime (CRT) Library. The errors do not happen with multi-lib (Non-monolithic)  DLL/Shared build.
In other words, the OP problem is not like the errors that I got.

To original poster (OP): You need to learn how to post a full build log on a website like https://forums.wxwidgets.org/.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

They are not an English only site; so, you might try posting in both English and another language.

Tim S.

Navigation

[0] Message Index

Go to full version