I guess that Novell api comes in a static or dinamic lib not in pure source, so you need to link against the corresponding lib. Novell used to favor Watcom C, I guess they go for MSVC nowadays. If they do, you may be able to link your app by simply renaming the lib to something like libwhatever.a and specifying -lwhatever in your project. Go for the dinamic lib, if there's one. Just as VB or Delphi can use a dll written in any language, you can use it with gcc too. But you need to find some reference about the dll, def file, import lib stuff.
rpeter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried linking calwin32.lib and the first error is gone.
'//e/program files/dev-c++/myexample/nwhello/nwhello_main.c:63: undefined reference to `NWCallsInit@8'
But then if I add one more lib ( clxwin32.lib) to remove the second error, I get other kinds of error as follows.
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL): warning: ignoring duplicate section `.text'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL): warning: ignoring duplicate section `.idata$5'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL): warning: ignoring duplicate section `.text'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL): warning: ignoring duplicate section `.idata$5'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$2'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$4'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$5'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
--------------------------------
How do resolve this problem?
Or How do you go for the DLL instead of static link? I see there are DLL in the Novell SDK.
Thank you very much for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
could you please help?
I am trying to write a small and first C program using novell api, and I have the following link error?
Is it possible to use Novell api? Thank you very much.
//e/program files/dev-c++/myexample/nwhello/nwhello_main.c:63: undefined reference to `NWCallsInit@8'
//e/program files/dev-c++/myexample/nwhello/nwhello_main.c:71: undefined reference to `NWCCGetPrimConnRef@4'
//e/program files/dev-c++/myexample/nwhello/nwhello_main.c:79: undefined reference to `NWCCGetAllConnRefInfo@12'
I guess that Novell api comes in a static or dinamic lib not in pure source, so you need to link against the corresponding lib. Novell used to favor Watcom C, I guess they go for MSVC nowadays. If they do, you may be able to link your app by simply renaming the lib to something like libwhatever.a and specifying -lwhatever in your project. Go for the dinamic lib, if there's one. Just as VB or Delphi can use a dll written in any language, you can use it with gcc too. But you need to find some reference about the dll, def file, import lib stuff.
rpeter
Thank you very much for the reply.
I tried linking calwin32.lib and the first error is gone.
'//e/program files/dev-c++/myexample/nwhello/nwhello_main.c:63: undefined reference to `NWCallsInit@8'
But then if I add one more lib ( clxwin32.lib) to remove the second error, I get other kinds of error as follows.
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL): warning: ignoring duplicate section `.text'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL): warning: ignoring duplicate section `.idata$5'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL): warning: ignoring duplicate section `.text'
E:\PROGRA~1\DEV-C_~1\Bin\ld.exe: E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL): warning: ignoring duplicate section `.idata$5'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$2'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$4'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
E:\Novell\ndk\nwsdk\lib\win32\mscvc\calwin32.lib(CALWIN32.DLL)(.idata$2+0x0): multiple definition of `idata$5'
E:\Novell\ndk\nwsdk\lib\win32\mscvc\clxwin32.lib(CLXWIN32.DLL)(.idata$2+0x0): first defined here
--------------------------------
How do resolve this problem?
Or How do you go for the DLL instead of static link? I see there are DLL in the Novell SDK.
Thank you very much for your help.