mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Link Errors


From: Thomas Dineen
Subject: [Mingw-cross-env-list] Link Errors
Date: Fri, 31 Jul 2015 00:52:22 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Gentle People:

I am getting the following link errors on these fairly trivial programs.
Please note the the code compiles and links perfectly on Solaris with gcc
with no linking command line options.

   Am I missing a -l library command line option?

   I will post the source on request.

   In what libraries are the symbols sprintf_s and address@hidden found?
So exactly what do I add to the command line?

These errors seem quite strange to me in that usually google will tell you what library the symbol is in and then you just add -llib to the command line?

Please help I have spent hours on google have ended up exhausted and confused!
Written at 12:51 AM!

i686-pc-mingw32-gcc Test_Shared.c dlfcn.c -lpsapi -o Test_Shared.exe

/tmp/ccJEa2nO.o:dlfcn.c:(.text+0x2fb): undefined reference to `sprintf_s' and address@hidden
collect2: error: ld returned 1 exit status


i686-pc-mingw32-gcc dlfcn.c -lpsapi -o dlfcn.o

/tmp/cc6fCJ7Q.o:dlfcn.c:(.text+0x2fb): undefined reference to `sprintf_s'
/home/tdineen/Mxe_Cross_Environment_120213/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/lib/libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to address@hidden'
collect2: error: ld returned 1 exit status
Linux3%

i686-pc-mingw32-gcc Test_Lib.c -o Test_Lib.so

/home/tdineen/Mxe_Cross_Environment_120213/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/lib/libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to address@hidden'
collect2: error: ld returned 1 exit status




reply via email to

[Prev in Thread] Current Thread [Next in Thread]