Re: Link problems
Eli Zaretskii <eliz-mXXj517/[email protected]> Sun, 31 May 2020 17:51:59 +0300
| Newsgroups | gmane.comp.gnu.mingw.user |
|---|---|
| Message-ID | <[email protected]> |
> From: Peter Williams <[email protected]> > Date: Sun, 31 May 2020 11:17:46 +0100 > > gcc -c -I C:\plplot32\include\plplot x03.c > gcc -o x03.exe x03.o C:\plplot32\lib\libcsirocsa.a C:\plplot32\lib\libplplot.a C:\plplot32\lib\libqsastime.a > -mconsole -mwindows -lm Why are you using both -mconsole and -mwindows? Don't they contradict each other? > c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: > c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(mbrscan.o):(.text+0xb6): undefined reference to > `SetLastError@4' > c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: > c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(wcharmap.o):(.text+0x208): undefined reference to > `WideCharToMultiByte@32' These look like either missing import libraries on the link command line, or maybe some snafu with including windows.h, which declares these functions. The former problem could have been caused by the fact that you used both -mconsole and -mwindows. I suggest to add -v to the GCC command line and see which libraries it scans. _______________________________________________ MinGW-Users mailing list [email protected] This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.osdn.me/mailman/listinfo/mingw-users Also: mailto:[email protected]?subject=unsubscribe