The library seems to be 'gdi32':
https://msdn.microsoft.com/en-us/library/vs/alm/dd144925%28v=vs.85%29.aspx
A library can be either static or dynamic. Static library is just a collection of object code and linker effectively copies code into executable during linking. Statically linked executable is a large monolith, but self-sufficient.
Dynamic library is object code too, but rather than copying actual code, the linker adds call code 'stubs' into the executable. When the executable (your program) is run, the library file is linked in and code is executed from it. Thus, the executable file does not work without the library file(s). The executable file is smaller and many programs may use same library; less duplication.
In *nix a dynamic library has extension .so
In OS X a dynamic library has extension .dyld
In Windows a dynamic library has extension .dll, but there is also a .lib file created with the dll that is a small static library containing the stubs thatthe linker inserts into the executable for the executable to link the dll.
The linker of GCC in Windows uses some mixture of library types.
P: n/a | Hi, I am building a application on linux. I am getting an error which relates to undefined reference to a function. I had build same on other platform, no error comes. Here is whole error message .. make: Warning: File `linux_i32' has modification time 9.5e+02 s in the future gcc -Dlinux_i32 -fPIC -I/usr/local/actel/actel-dinkum/include - D_ALT_NS=1 -t -mt -o linux_i32/globchat /home/ruchira/windu5/lib.linux_i32/wincrt0.o /home/ ruchira/windu5/ lib.linux_i32/wu.o linux_i32/about.o linux_i32/dispatch.o linux_i32/ globchat.o linux_i 32/init.o linux_i32/misc.o linux_i32/winmain.o linux_i32/def.o -L/home/ ruchira/windu5/ lib.linux_i32 -lwinsock50 -L/home/ruchira/windu5/lib.linux_i32 -lgdi50 -luser50 -lkern el50 -lprnt50 -L/usr/X11R6/lib -lXm -L/usr/X11R6/lib -lXt -lm -ldl - lnsl -lpthread linux_i32/globchat.o(.text+0x1ea): In function `MsgCreate': : undefined reference to `EnumProtocolsA' linux_i32/globchat.o(.text+0x248): In function `MsgCreate': : undefined reference to `EnumProtocolsA' /usr/bin/ld: link errors found, deleting executable `linux_i32/ globchat' /usr/bin/ld: mode elf_i386 /usr/lib/gcc/i386-redhat-linux/3.4.3/./././crt1.o /usr/lib/gcc/i386-redhat-linux/3.4.3/./././crti.o /usr/lib/gcc/i386-redhat-linux/3.4.3/crtbegin.o /home/ruchira/windu5/lib.linux_i32/wincrt0.o /home/ruchira/windu5/lib.linux_i32/wu.o linux_i32/about.o linux_i32/dispatch.o linux_i32/globchat.o linux_i32/init.o linux_i32/misc.o linux_i32/winmain.o linux_i32/def.o -lwinsock50 (/home/ruchira/windu5/lib.linux_i32/libwinsock50.so) -lgdi50 (/home/ruchira/windu5/lib.linux_i32/libgdi50.so) -luser50 (/home/ruchira/windu5/lib.linux_i32/libuser50.so) -lkernel50 (/home/ruchira/windu5/lib.linux_i32/libkernel50.so) -lprnt50 (/home/ruchira/windu5/lib.linux_i32/libprnt50.so) -lXm (/usr/X11R6/lib/libXm.so) -lXt (/usr/X11R6/lib/libXt.so) -lm (/usr/lib/gcc/i386-redhat-linux/3.4.3/./././libm.so) -ldl (/usr/lib/gcc/i386-redhat-linux/3.4.3/./././libdl.so) -lnsl (/usr/lib/gcc/i386-redhat-linux/3.4.3/./././libnsl.so) /lib/libpthread.so.0 -lgcc_s (/usr/lib/gcc/i386-redhat-linux/3.4.3/libgcc_s.so) /lib/libc.so.6 (/usr/lib/libc_nonshared.a)elf-init.oS -lgcc_s (/usr/lib/gcc/i386-redhat-linux/3.4.3/libgcc_s.so) /usr/lib/gcc/i386-redhat-linux/3.4.3/crtend.o /usr/lib/gcc/i386-redhat-linux/3.4.3/./././crtn.o collect2: ld returned 1 exit status make: *** [linux_i32/globchat] Error 1 Can anybody say why it comes and what the solutions? Thanks, Navneet
|
|
Jun 23, 2017 Please post the FULL output text from your compiler. If the message is 'ld returned exit status 1', that's generally an indication of a linker error. The linker output (which you haven;t shown) should give an indication of the problem. Last edited on Jun 22, 2017 at 5:10pm UTC. Error Id returned 1 exit status. But ld that complains. Dev-C is not a compiler. It is an IDE. V3.1 Spotted an error?
C++ Error Id Returned 1 Exit Status
Apr 22, 2013 Do you mean: 'IDE returned 1 exit status'? If so, it's because there probably was an error in your program and it didn't return correctly at the end of it. A program should always return 0 when terminating. If it's returning 1 at termination there was some kind of error interrupting. Daisydisk windows download. I think you mean Ld returned 1 exit status. Do you really mean you tried to link the 2 c files and the h file or do you mean you compiled the c files and tried to link the resulting objects? The processor of building a program is. Compile each individual source (.c) file producing an object file (.o or.obj). 1d returned 1 exit status error First of all you have to create a project by clicking file new and then project and give project name select the language c or c and select empty also. Then your program is under that project. And then give a program name save it.