c++ - linking Borland C++ 3.1 libraries in 16 bit DOS mode
- =?ISO-8859-2?Q?Micha=B3_Kandulski?= (6/6) May 08 2003 I can't link a Borland C++ 3.1 library to link my DOS executable.
- Jan Knepper (7/13) May 08 2003 What are you trying to do? Link a Borland C++ 3.1 DOS library into a Dig...
- user domain.invalid (11/25) May 08 2003 This is what I'm trying to do:
- Jan Knepper (11/35) May 08 2003 The commercial library not come with a library for Zortech/Symantec or M...
- user domain.invalid (4/16) May 09 2003 It was C indeed. Thanks for help.
- roland (13/18) May 08 2003 user@domain.invalid a écrit:
- =?ISO-8859-2?Q?Micha=B3_Kandulski?= (3/24) May 09 2003 That was it! How could I forget?! Thanks!
I can't link a Borland C++ 3.1 library to link my DOS executable. Is it possible at all? I use one of library functions in my "main". The linker says that it doesn't see the function, although it doesn't complain about the format of .lib file. Are there any linker (compiler) switches that make things work? Michal
May 08 2003
What are you trying to do? Link a Borland C++ 3.1 DOS library into a Digital Mars C++ generated DOS executable? Which functions do you need??? Micha³ Kandulski wrote:I can't link a Borland C++ 3.1 library to link my DOS executable. Is it possible at all? I use one of library functions in my "main". The linker says that it doesn't see the function, although it doesn't complain about the format of .lib file. Are there any linker (compiler) switches that make things work? Michal-- ManiaC++ Jan Knepper
May 08 2003
This is what I'm trying to do: 1) I've got a commercial library (designed for a laser bar code scanner). It works fine with Borland C++ 3.1 compiler. 2) I need to meke an 16 bit DOS executable. 3) I'm trying to make it with Digital Mars C++ compiler (because there are some reasons why I don't want to use the Borland compiler). 4) While I link the library with an OBJ that contains a call to a certain function, the linker does not see the function, although the library contains it for sure. That's my problem. MichalI can't link a Borland C++ 3.1 library to link my DOS executable. Is it possible at all? I use one of library functions in my "main". The linker says that it doesn't see the function, although it doesn't complain about the format of .lib file. Are there any linker (compiler) switches that make things work? MichalWhat are you trying to do? Link a Borland C++ 3.1 DOS library into a Digital Mars C++ generated DOS executable? Which functions do you need???
May 08 2003
user domain.invalid wrote:>>I can't link a Borland C++ 3.1 library to link my DOS executable. >> >>Is it possible at all? >> >>I use one of library functions in my "main". The linker says that it doesn't see >>the function, although it doesn't complain about the format of .lib file. >> >>Are there any linker (compiler) switches that make things work? >> >>Michal >The commercial library not come with a library for Zortech/Symantec or Microsoft? If so, try to use Symantec or Zortech, than Microsoft...What are you trying to do? Link a Borland C++ 3.1 DOS library into a Digital Mars C++ generated DOS executable? Which functions do you need???This is what I'm trying to do: 1) I've got a commercial library (designed for a laser bar code scanner). It works fine with Borland C++ 3.1 compiler.2) I need to meke an 16 bit DOS executable. 3) I'm trying to make it with Digital Mars C++ compiler (because there are some reasons why I don't want to use the Borland compiler).There are many obvious reasons for that. ;-)4) While I link the library with an OBJ that contains a call to a certain function, the linker does not see the function, although the library contains it for sure.Is it C or C++? Can you list the functions in the library with tbe LIB (Digital Mars LIB.exe) command line tool? Have you confirmed the calling convention/declaration of the functions? -- ManiaC++ Jan Knepper
May 08 2003
Jan Knepper wrote:I would'n bother if I had such.1) I've got a commercial library (designed for a laser bar code scanner). It works fine with Borland C++ 3.1 compiler.The commercial library not come with a library for Zortech/Symantec or Microsoft? If so, try to use Symantec or Zortech, than Microsoft...[...] Is it C or C++? Can you list the functions in the library with tbe LIB (Digital Mars LIB.exe) command line tool? Have you confirmed the calling convention/declaration of the functions?It was C indeed. Thanks for help. Michal
May 09 2003
user domain.invalid a écrit: . . .4) While I link the library with an OBJ that contains a call to a certain function, the linker does not see the function, although the library contains it for sure. That's my problem. Michalcheck name mangling or leading underscore. generate the assembly listing (.cod) to see what is the real name of the function the compiler is calling. you can also generate a .map file. hope the functions in the .lib are pure C (no name mangling). declare the function as extern "C" example: extern "C" int myfunc(int myarg); roland
May 08 2003
roland wrote:> 4) While I link the library with an OBJ that contains a call to a certain > function, the linker does not see the function, although the library > contains it for sure. > > That's my problem. > > Michal > check name mangling or leading underscore. generate the assembly listing (.cod) to see what is the real name of the function the compiler is calling. you can also generate a .map file. hope the functions in the .lib are pure C (no name mangling). declare the function as extern "C" example: extern "C" int myfunc(int myarg); rolandThat was it! How could I forget?! Thanks! Michal
May 09 2003